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-NUMBERPIC 9(4). 05 EMP-LASTNAME PIC X(11). 05 EMP-FIRSTNAMEPIC X(11). 05 EMP-SEXPIC X(1). 05 EMP-DEPTIDPIC X(4). 05 EMP-SALARYPIC 9(8).
File System Model Cust Inv Sales Program 1 Program 2 Program 4 Program 3 Program 5
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.
The Solution: DBMS File 1 File X 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.
The Solution: DBMS File 1 File X 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
The Solution: DBMS File 1 File X 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 Cust Index Sales Index Inv
The Solution: DBMS File 1 File X 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. Constraints
The Solution: DBMS File 1 File X 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
The Solution: DBMS File 1 File X 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
The Solution: DBMS File 1 File X 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 Recovery Log Files Recovery
The Solution: DBMS File 1 File X 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
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.
Relational Database Management Systems Key Constructs
Relations and Tuples EMPIDLNAMEFNAMEDEPTPHONESALARY 23JonesMarkITR SmithSaraFINC BillingsDavidACTG DanceIvannaACTG JonesMaryITR BarkerBobACTG WoodsRobinITR JonesMaryFINC Employees Table SEX M F M F F M M F
Retrieving Info from Multiple Tables Programs Table EMPIDLANGUAGE PROFICIENCY COBOLGOOD SQL JAVA GOOD EXCELLENT EMPIDLNAMEFNAMEDEPTPHONESALARY 23JonesMarkITR SmithSaraFINC BillingsDavidACTG DanceIvannaACTG JonesMaryITR BarkerBobACTG WoodsRobinITR JonesMaryFINC Employees Table SEX M F M F F M M F VBGOOD VB SQL COBOL JAVA COBOLEXCELLENT GOOD EXCELLENT NAME COBOL SQL JAVA VB FULLNAME COmmon Business Oriented Language Structured Query Language JAVA Visual Basic Languages Table 37SQLFAIR