Database Management n Database Hierarchy n File-oriented Approach n Database-oriented Approach n DBMS n Entity Relationship Diagram n Data Structures
Database Hierarchy Logical Data Storage Physical Data Storage Database File Record Byte Bit
Database File Record Field Byte Bit Hierararchical Element Example 100Brake PadSonataDY10, Spark PlugAvanteDY 3, HeadlightAvanteJS65,000 3 Brake Pad Sales FileOrder File Product File Part Database Product File No.DescriptionModel Vendor Unit Pr. Qty 100Brake PadSonataDY10,0005 No.DescriptionModel Vendor Unit Pr. Qty ‘Description’ Field Record of the Part ‘Brake Pad’ The Alphabet ‘B’ in ‘Brake Pad’ The Rightmost bit in the Alphabet ‘B’
File-oriented Approach Order Entry Program Order Entry Program Invoicing Program Invoicing Program Sales Accounting Warehousing Packing List Program Packing List Program 매입 파일 Order File 매입 파일 Invoice File 매입 파일 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 Order Entry Program Order Entry Program Invoicing Program Invoicing Program Sales Accounting Warehousing Packing List Program Packing List Program DBMS 데이터베이스 Order File, Invoice File, Packing List File
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 Program 1 Program 2 Program 3 OrganizationalDatabase DBMS Applications DDL DML Data Dict. DB
Microsoft Access: a DBMS for Windows 98
Order Product Contains Is- Purchased- From Vendor Order Number Order Date Product Code Quantity Ordered Amount Total Amount Data Attributes for the ‘Order’ Entity Product Code Description Unit Price Vendor Data Attributes for the ‘Product’ Entity Vendor ID Vendor Name Mailing Address Phone Number Data Attributes for the ‘Vendor’ Entity Entity-Relationship Diagram(ERD)
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)
Project 1 Dept. 1 Dept. 2 Dept. 3 Employee 1 Employee 2 Employee 3 Employee 4 Employee 5 Employee 6 Tree Data Model
Network Data Model Project 1 Dept. 1 Dept. 2 Dept. 3 Employee 1 Employee 2 Employee 3 Employee 4 Employee 5 Employee 6 Project 2
Project Table Employee Table Department Table Relational Data Model