Database Management Database Hierarchy n Fileoriented Approach n
Database Management Database Hierarchy n File-oriented Approach n Database-oriented Approach n DBMS n Entity Relationship Diagram n Data Structures n
Database Hierarchy Database File Record Byte Bit Logical Data Storage Physical Data Storage
Hierararchical Element Example Sales File Database File Record Order File Product File No. 100 105 110 Description Brake Pad Spark Plug Headlight Model Vendor Sonata DY Avante JS Unit Pr. Qty 10, 000 5 3, 000 10 65, 000 3 No. Description Model Vendor Unit Pr. Qty 100 Brake Pad Sonata DY 10, 000 5 Part Database Product File Record of the Part ‘Brake Pad’ Field Brake Pad ‘Description’ Field Byte 10101000 The Alphabet ‘B’ in ‘Brake Pad’ 0 The Rightmost bit in the Alphabet ‘B’ Bit
File-oriented Approach Sales Accounting Warehousing Order Entry Program Order 매입 File파일 매입 파일 Invoicing Program Invoice 매입 File파일 매입 파일 Packing List Program Packing List 매입 File파일 매입 파일
Problems of File-oriented Approach n Data Redundancy n Data Inconsistency n Program-Data Dependency n Data Sharing Problem
Database-oriented Approach Sales Accounting Order Entry Program Invoicing Program DBMS Order File, Invoice File, Packing List File 데이터베이스 Warehousing Packing List Program
Advantages of Database Approach n Data sharing n Easy data access n Data integrity n No data redundancy n Easy modification & update n Program-data independence n Standardized data access n Data security
Database Management System Applications DBMS Organizational Database Program 1 DDL Program 2 DB DML Program 3 Data Dict.
Microsoft Access: a DBMS for Windows 98
Entity-Relationship Diagram(ERD) Order Contains Product Is. Purchased. From Vendor Data Attributes for the ‘Order’ Entity • Order Number • Order Date • Product Code • Quantity Ordered • Amount • Total Amount Data Attributes for the ‘Product’ Entity • Product Code • Description • Unit Price • Vendor Data Attributes for the ‘Vendor’ Entity • Vendor ID • Vendor Name • Mailing Address • Phone Number
Logical Data Models n Tree (Hierarchical) Data Model – simple to understand & implement – parent-child relationship n Network Data Model – quite complex – owner-member relationship n Relational Data Model – data is represented as tables (i. e. , rows & columns)
Tree Data Model Project 1 Dept. 1 Employee 2 Dept. 2 Employee 3 Dept. 3 Employee 4 Employee 5 Employee 6
Network Data Model Project 1 Dept. 1 Employee 2 Project 2 Dept. 2 Employee 3 Dept. 3 Employee 4 Employee 5 Employee 6
Relational Data Model Project Table Department Table Employee Table
- Slides: 14