Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof....

25
Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University [email protected] http://www2.norwich.edu/mkabay

Transcript of Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof....

Page 1: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

Introduction to Database

ProcessingIS 240 – Database Management

Lecture #1 – 2004-01-15Prof. M. E. Kabay, PhD, CISSP

Norwich University

[email protected]

http://www2.norwich.edu/mkabay

Page 2: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

2 Copyright © 2004 M. E. Kabay. All rights reserved.

Topics

Why study DBMS?DBMS ApplicationsHistorical OverviewDefining “Database”How a DBMS Is UsedHistorical Development of DBMSSome Fundamental Issues in DB ApplicationsHOMEWORK

Page 3: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

3 Copyright © 2004 M. E. Kabay. All rights reserved.

Why study DBMS?

Central technology of today’s information technology (IT)

Teaches orderly analysis of data requirements and relationships

Opportunity to understand internals underlying externals of applications

Provides basis for rapid assimilation and application of wide range of specific DBMS tools

Structured Query Language (SQL) almost universally used in industry

Increases likelihood of good jobs

Page 4: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

4 Copyright © 2004 M. E. Kabay. All rights reserved.

DBMS Applications

DBMS = database management systemDatabase contains one or more tables (files,

datasets)columns = fieldsrows = records

Relations among tables help navigate DBDB Application allows access to database

usable formatsdata entryreports

Page 5: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

5 Copyright © 2004 M. E. Kabay. All rights reserved.

Concurrency

Single-user database allows only one user at a timeaka exclusive access

Types of access permissionsREADWRITEAPPENDLOCK

Multi-user databases need to protect against damage to records

Page 6: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

6 Copyright © 2004 M. E. Kabay. All rights reserved.

Concurrency (cont’d)

Joe accesses Widget record

Shakheena accesses Widget record

Inventory shows 25 to both

Joe takes out 10

Application writes out record to DB

Inventory now shows 15

Shakheena takes out 5 from her copy of data (25)

Inventory now shows 20

TIME

Page 7: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

7 Copyright © 2004 M. E. Kabay. All rights reserved.

Historical Overview

How did people handle masses of data?Manual systems

Clay tabletsParchmentPaperAbacus

Punch cards (1890-1960)File systems (1950-present)DBMS (1970-present)

Page 8: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

8 Copyright © 2004 M. E. Kabay. All rights reserved.

Problems with File Systems

Separated, isolated dataDuplication of dataFile-format dependencyFile incompatibilitiesHard to show useful views of data

Page 9: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

9 Copyright © 2004 M. E. Kabay. All rights reserved.

Problems: Separated, Isolated Data

Multiple files for different aspects of systemLinkages handled entirely by application

programmingCoordinate access to multiple files for

different functionsSome databases have hundreds of files

Page 10: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

10 Copyright © 2004 M. E. Kabay. All rights reserved.

Problems: Duplication Of Data

Early collections of files duplicated datae.g., identifiers (name, address. . . .)

Easy to generate discrepanciescopies of data in different records and

different files could diverge from each other

Frustrating for users and clientsenter same information over and over

Results inconsistent, contradictorysend invoice to old address in one

program, new address in other program

Page 11: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

11 Copyright © 2004 M. E. Kabay. All rights reserved.

Problems: File-format Dependency

Structure of data files hard-coded in application program

All changes to data files requires modification of programsrewrite data descriptionrewrite special code for linking or

searchingrecompile source code to generate objectupdate documentation

Page 12: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

12 Copyright © 2004 M. E. Kabay. All rights reserved.

Problems: File Incompatibilities

Different analysts and programmers used different data definitionsNAME has 20 charsNAME has 40 chars

Different names for fieldsSSN vs SS#LAST_NAME vs L_NAME

Different record structuresLAST | FIRST | STREET1 | STREET 2 | CITYNAME | ADDRESS | CITY_&_STATE

Page 13: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

13 Copyright © 2004 M. E. Kabay. All rights reserved.

Problems: Hard To Show Useful Views Of Data

Combining fields from different records in different files necessary for most usersreportson-screen visualization

Every report / screen requires special programmingfind data (often by serial search)place in output in specific positionsall require a great deal of programming

Page 14: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

14 Copyright © 2004 M. E. Kabay. All rights reserved.

Defining “Database”

“A database is a self-describing collection of integrated records.”

Self-describing IntegratedModel of a model

Page 15: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

15 Copyright © 2004 M. E. Kabay. All rights reserved.

How a DBMS Is Used

DATA DICTIONARY

API

APPLICATION PROGRAMS

DATA

QUERYTOOLS

INTERNALS

Page 16: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

16 Copyright © 2004 M. E. Kabay. All rights reserved.

Self-describingDatabases have data dictionaries

aka data directory or metadataData dictionary supports independence between

programs and databaseChange in data dictionary does NOT usually

require change in programEnormous reduction in programming

complexity and maintenance of programsData dictionary supports independence between

database and documentationConstant problem: bad documentationDBMS helps reduce dependence on manual

documents

Page 17: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

17 Copyright © 2004 M. E. Kabay. All rights reserved.

Integrated

Files are accessed in systematic waySpecial files maintain indexes that help speed

access“Find all records where name begins with

S”Find records where city_population >

750,000 and household_median_income > $50,000

Application metadata can include report structures“Print the invoice for Mrs Smith’s fuel oil

deliveries this month”

Page 18: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

18 Copyright © 2004 M. E. Kabay. All rights reserved.

Model of a model

Databases are designed by peopleDB does not directly reflect “reality”DB reflects designer’s decisions about

how to represent user’s perceptions of what matters

“The availability of a tool determines perceptions of what’s a reasonable request.”As users learn to use their DB, they begin

to think in new waysRecognize new possibilities, need new

functionsDatabases evolve as they are used

Page 19: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

19 Copyright © 2004 M. E. Kabay. All rights reserved.

Historical Development of DBMS

1970s: E. F. Codd – relational DB modelnormalization of datareduce repetition

1980s: Microcomputers: dBase IInot DBMSnot relationalbut interfaces improvedmainframe products ported to PCs

Page 20: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

20 Copyright © 2004 M. E. Kabay. All rights reserved.

Historical Development of DBMS (cont’d)

Mid-1980s: client-server architectureLink inexpensive computers in networks

(LANs)Store data on serversRun client programs on workstations for

user interface, some computations, reports1990s: Web-based systems

Web exploded into use ~1993Common interface: browser

client software reading standard formatting codes – HTML, XML, JAVA

Page 21: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

21 Copyright © 2004 M. E. Kabay. All rights reserved.

Some Fundamental Issues in DB Applications

Ethical constraints on data gathering and usage (details later in course)How do we protect data subjects against

abuse?Security (details later)

confidentialitycontrolintegrityauthenticityavailabilityutility

Page 22: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

22 Copyright © 2004 M. E. Kabay. All rights reserved.

Homework

Study Kroenke Chapter 1 using SQ3RBy next Thu, 23 Jan 2003: required

Write out answers to each of the Group 1; print your responses and bring them to class

Questions 1.1 through 1.23 using a computer (23 points)

Short (½ to 1 page) response to Project A on page 23 (2 points)

Short response to Project B (2 points)

Page 23: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

23 Copyright © 2004 M. E. Kabay. All rights reserved.

For Extra Credit

1 point each: optionalWrite out & print answers by Thu 30 Jan 2003FiredUp Project Question AFiredUp Project Question B (only if A done)

Page 24: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

24 Copyright © 2004 M. E. Kabay. All rights reserved.

Preparation for Next Class

Review Kroenke Chapter 1Scan Kroenke Chapter 2Apply SQ3R global scan to Ferrett et alStudy Ferrett et al Projects 1 & 2Load files from Ferrett CD-ROM onto your

own computer if you have oneAmazon has the 1st chapter of Kroenke;

search on Kroenke and look for the 8th edition.

Also see the Kroenke Web site at

http://www.prenhall.com/kroenke

Page 25: Introduction to Database Processing IS 240 – Database Management Lecture #1 – 2004-01-15 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu.

25 Copyright © 2004 M. E. Kabay. All rights reserved.

DISCUSSION