database management systems introduction. in the beginning… customer program 1

17
Database Management Systems Introduction

Upload: jeremy-tate

Post on 02-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Database Management Systems Introduction. In the Beginning… Customer Program 1

Database Management Systems

Introduction

Page 2: Database Management Systems Introduction. In the Beginning… Customer Program 1

In the Beginning…

CustomerProgram 1

Page 3: Database Management Systems Introduction. In the Beginning… Customer Program 1

Program-Data Dependence

DATA DIVISION.

FILE SECTION.

FD EMP-FILE LABEL RECORDS ARE OMITTED.

01 EMP-RECORD. 05 EMP-NUMBER PIC 9(4). 05 EMP-LASTNAME PIC X(11). 05 EMP-FIRSTNAME PIC X(11). 05 EMP-SEX PIC X(1). 05 EMP-DEPTID PIC X(4). 05 EMP-SALARY PIC 9(8).

Page 4: Database Management Systems Introduction. In the Beginning… Customer Program 1

File System Model

Cust

Inv

Sales

Program 1

Program 2

Program 4

Program 3

Program 5

Page 5: Database Management Systems Introduction. In the Beginning… Customer Program 1

Problems with File System Model

• Changes to file structure or file location effect many programs causing high maintenance costs.

• Data in various and sometimes proprietary data formats.

• File Indexes were easily corrupted if not open during data entry, updates, or deletes.

• All Data validation was completely dependent on all application programs.

• All Data security was completely dependent on all application programs.

• Efficient Multi-application / multi-user access to the same file(s) required strict adherence to agreed upon locking strategies.

• Integrated backup and recovery of hundreds of data files is difficult to control.

• Tendency for redundant data to enter various data files.

Page 6: Database Management Systems Introduction. In the Beginning… Customer Program 1

The Solution: DBMS

File1

FileX

Program 1

Program 2

Program 4

Program 3

Program 5

Cust

Sales

Inv

DBMS

SQL

Changes to file structure or file location are transparent to application programs. Maintenance costs drop dramatically.

Page 7: Database Management Systems Introduction. In the Beginning… Customer Program 1

The Solution: DBMS

File1

FileX

Program 1

Program 2

Program 4

Program 3

Program 5

Cust

Sales

Inv

DBMS

SQL

All data is available through a standard SQL interface and related, industry standard query and reporting tools.

Q & R tools

Page 8: Database Management Systems Introduction. In the Beginning… Customer Program 1

The Solution: DBMS

File1

FileX

Program 1

Program 2

Program 4

Program 3

Program 5

DBMS

SQL

All Indexes are automatically opened and updated during insert, update, and delete operations eliminating the primary cause of index corruption.

Index IndexCust

IndexSales

IndexInv

Page 9: Database Management Systems Introduction. In the Beginning… Customer Program 1

The Solution: DBMS

File1

FileX

Program 1

Program 2

Program 4

Program 3

Program 5

Cust

Sales

Inv

DBMS

SQL

All Data validation rules are defined within the DBMS and enforced independently of application program logic.

Con

stra

ints

Page 10: Database Management Systems Introduction. In the Beginning… Customer Program 1

The Solution: DBMS

File1

FileX

Program 1

Program 2

Program 4

Program 3

Program 5

Cust

Sales

Inv

DBMS

SQL

Primary responsibility for Data security is now handled by the DBMS providing user based security down to the attribute level.

Users

Grants

Page 11: Database Management Systems Introduction. In the Beginning… Customer Program 1

The Solution: DBMS

File1

FileX

Program 1

Program 2

Program 4

Program 3

Program 5

Cust

Sales

Inv

DBMS

SQL

All aspects of multi-user access are handled by the DBMS.

•Locks•Rollbacks•Commits•Transactions

Page 12: Database Management Systems Introduction. In the Beginning… Customer Program 1

The Solution: DBMS

File1

FileX

Program 1

Program 2

Program 4

Program 3

Program 5

Cust

Sales

Inv

DBMS

SQL

A comprehensive, integrated solution to backup and recovery is provided.

Backup R

ecov

ery

LogFiles

Recovery

Page 13: Database Management Systems Introduction. In the Beginning… Customer Program 1

The Solution: DBMS

File1

FileX

Program 1

Program 2

Program 4

Program 3

Program 5

Cust

Sales

Inv

DBMS

SQL

A single normalized conceptual model of all data managed by a database administrator (DBA) eliminating redundant and therefore inconsistent data.

Schema

DBA

Page 14: Database Management Systems Introduction. In the Beginning… Customer Program 1

Summary of DBMS Solutions• Changes to file structure or file location are transparent to

application programs. Maintenance costs drop dramatically.• All data is available through a standard SQL interface and related,

industry standard query and reporting tools. • All Indexes are automatically opened and updated during insert,

update, and delete operations eliminating the primary cause of index corruption.

• All Data validation rules are defined within the DBMS and enforced independently of application program logic.

• Primary responsibility for Data security is now handled by the DBMS providing user based security down to the attribute level.

• All aspects of multi-user access are handled by the DBMS.• A comprehensive, integrated solution to backup and recovery is

provided.• A single conceptual model of all data managed by a DBA.

Page 15: Database Management Systems Introduction. In the Beginning… Customer Program 1

Relational Database Management Systems

Key Constructs

Page 16: Database Management Systems Introduction. In the Beginning… Customer Program 1

Relations and Tuples

EMPID LNAME FNAME DEPT PHONE SALARY

23 Jones Mark ITR 555-1087 45000

25 Smith Sara FINC 555-2222 49000

26 Billings David ACTG 555-4356 42000

31 Dance Ivanna ACTG 444-4887 60000

32 Jones Mary ITR 555-8745 70000

35 Barker Bob ACTG 555-6565 44000

36 Woods Robin ITR 555-9812 90000

37 Jones Mary FINC 555-1234 56000

Employees Table

SEX

M

F

M

F

F

M

M

F

Page 17: Database Management Systems Introduction. In the Beginning… Customer Program 1

Retrieving Info from Multiple Tables

Programs TableEMPID LANGUAGE

2323

32

233132

PROFICIENCY

COBOL GOOD

SQLSQL

SQLJAVA

JAVA GOOD

GOOD

EXCELLENTEXCELLENTEXCELLENT

EMPID LNAME FNAME DEPT PHONE SALARY

23 Jones Mark ITR 555-1087 4500025 Smith Sara FINC 555-2222 5500026 Billings David ACTG 555-4356 4200031 Dance Ivanna ACTG 444-4887 6000032 Jones Mary ITR 555-8745 7000035 Barker Bob ACTG 555-6565 4400036 Woods Robin ITR 555-9812 9000037 Jones Mary FINC 555-1234 56000

Employees TableSEX

MFMFFMMF

3232

37

363636

VB GOOD

VBSQL

COBOLJAVA

COBOL EXCELLENT

GOOD

EXCELLENTEXCELLENTEXCELLENT

NAME

COBOL

SQLJAVA

VB

FULLNAME

COmmon Business Oriented Language

Structured Query LanguageJAVA

Visual Basic

Languages Table37 SQL FAIR