140 likes | 226 Views
An Introduction to Databases. Databases - 1. Agenda Storage and retrieval concepts Flat file - hierarchical - network Concept of relationships 1 to 1 1 to many Views of data. STOCK ITEM. STOCK ITEM. STOCK ITEM. STOCK ITEM. 12345. 12345. Part No:. 7. N/A. Quantity. Colour. 4.
E N D
An Introduction to Databases Revised Sept. 2003
Databases - 1 • Agenda • Storage and retrieval concepts • Flat file - hierarchical - network • Concept of relationships • 1 to 1 • 1 to many • Views of data Revised Sept. 2003
STOCK ITEM STOCK ITEM STOCK ITEM STOCK ITEM 12345 12345 Part No: 7 N/A Quantity Colour 4 98 Reorder Qty Weight Ferris F37 Supplier Name Location F2 Supplier Code c801 Description PRIMARYKEY Supplier Part No: Cadmium Bar 90mm dia Data Files • Structured FILE RECORD FIELD(S) FIELD VALUES KEY FIELD Revised Sept. 2003
STOCK ITEM STOCK ITEM STOCK ITEM LOGICAL 12345 12345 Part No: 7 FIELD(S) N/A Quantity Colour 4 98 Reorder Qty FIELD VALUES Weight Ferris F37 Supplier Name Location F2 Supplier Code PHYSICAL c801 Description Supplier Part No: Cadmium Bar 90mm dia Logical vs. Physical Revised Sept. 2003
File - based approach Application Data held Responsibility for data Part No, Supplier, qty location, reorder qty Stock Control Stores Production Control Part No, qty, Assy No:, Machine No:, Cert. No: Operations Accounts Payable Supplier, Supplier Pt No:, Part No: Cost, Qty ordered, Qty del. Finance Revised Sept. 2003
Database Database Management System Database approach Application Stock Control Production Control Supplier, Supplier Pt No:, Part No: Cost, Qty ordered, Qty del., qty, Assy No:, Machine No:, Cert. No: location, reorder qty Accounts Payable Revised Sept. 2003
Inventory Customer Service Finance Production H R External Schemas and Views Conceptual External Internal Revised Sept. 2003
STOCK ITEM STOCK ITEM STOCK ITEM 12345 12345 7 N/A 4 98 Ferris F37 F2 c801 Cadmium Bar 90mm dia Relationships - 1:1 Part No: Quantity Colour Reorder Qty Weight Supplier Name Location Supplier Code Description Supplier Part No: Revised Sept. 2003
STOCK ITEM STOCK ITEM STOCK ITEM 12345 7 N/A 4 98 Ferris F37 F2 c801 Cadmium Bar 90mm dia Relationships - 1:n Part No: 12345 Quantity Colour Reorder Qty Weight Supplier Name Location Supplier Code Description Supplier Part No: Revised Sept. 2003
STOCK ITEM STOCK ITEM STOCK ITEM 12345 7 N/A 4 98 Ferris F37 F2 c801 Cadmium Bar 90mm dia Relationships - m:n Part No: 12345 Quantity Colour Reorder Qty Weight Supplier Name Location Supplier Code Description Supplier Part No: Revised Sept. 2003
Database Types - 3 Models • Each database uses a definition language • imposes restrictions on • what can be defined • how entities relate to each other Hierarchical model Network model Relational model Revised Sept. 2003
Supplier Name Link File Supplier Part No: Database Types - Network Can show all 1:n relationships between records Part No: Revised Sept. 2003
Electrical Steel Oils Fasteners Part No: Quantity Supplier Name Location Supplier Code Supplier Part No: Database Types - Hierarchical STOCK Revised Sept. 2003