Presentation is loading. Please wait.

Presentation is loading. Please wait.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.

Similar presentations


Presentation on theme: "DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database."— Presentation transcript:

1 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database Designs Part Three Database Processing: Fundamentals, Design, and Implementation

2 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-2 Relationships Using ID-Dependent Entities: Four Uses for ID-Dependent Entities Representing N:M Relationships (earlier) Association Relationships (earlier) Multivalued Attributes Archetype/Instance Relationships

3 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-3 Relationships Using ID-Dependent Entities: Multivalued Attributes As a data model As a set of tables

4 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-4 Relationships Using ID-Dependent Entities: Archetype/Instance Pattern As a data model As a set of tables

5 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-5 Mixed Entity Relationships: The Line-Item Pattern As a data model

6 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-6 Mixed Entity Relationships: The Line-Item Pattern As a set of tables

7 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-7 Enforcing Minimum Cardinality

8 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-8 Actions When Parent Required

9 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-9 CUSTOMER ORDER DATA MODEL CUSTOMER ORDER DESIGN MODEL* *Needs physical domain & null status CustID(PK) Fname Lname … OrderNO (PK) … CustID (FK) NOT NULL Name … Name … OrderNo … OrderNo …

10 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-10 Access Implementation

11 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-11 Actions When Child Required

12 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-12 MINOR_PRECEPTOR STUDENT DATA MODEL MINOR_PRECEPTOR STUDENT DESIGN MODEL* *Needs physical domain & null status FID (PK) Fname Lname Program SID (PK) Fname Lname MatricDate Minor_Preceptor(FK) NULL FID Fname Lname Program FID Fname Lname Program SID Fname Lname MatricDate SID Fname Lname MatricDate

13 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-13 Access Implementation

14 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-14 Referential Integrity Actions: Required Child (O-M) Child Required MINOR_PRECEPTOR Action on Parent MINOR_PRECEPTOR Action on Child STUDENT Insert Update key or foreign key Delete

15 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-15 Actions to Enforce M-M Difficult task Avoid when possible More study, more time when cannot avoid Revisit Order/Line Item

16 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-16 ORDER DATA MODEL ORDER DESIGN MODEL* *Needs physical domain & null status OrderNo(PK) … OrderNo … OrderNo … LINE_ITEM M-M Minumum Cardinality: Special Case OrderNo (PK) (FK) LineNo (PK) … LineNo … LineNo …

17 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-17 M-M Minumum Cardinality: Special Case Strong Entity & Weak Entity Origination of all transactions: Strong entity Enforcement of referential integrity actions –Parent Actions for Required Parent Required Child –Generally, ignore Child Actions

18 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-18 ORDER DATA MODEL ORDER DESIGN MODEL* *Needs physical domain & null status OrderNo(PK) … OrderNo … OrderNo … LINE_ITEM Required Parent: Actions on Parent (slide 8) OrderNo (PK) (FK) LineNo (PK) … LineNo … LineNo …

19 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-19 Required Child: Action on Parent (slide 11) Child Required Insert Update key or foreign key Delete

20 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-20 Financial Environment Can we ignore transactions that originate from the child side? –M-M –Strong/Weak entity relationships

21 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-21 TOPPING LINE_ITEM DATA MODEL TOPPING LINE_ITEM DESIGN MODEL* *Needs physical domain & null status TID (SK) Topping OrderNo (PK) (FK) LineNo (PK) … TID (FK) Not NULL Topping OrderNo LineNo … Topping1 OrderNo LineNo … Topping1 Group Problem: Document Actions to Enforce M-O Relationship Top1_Assignment

22 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-22 David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10 th Edition) End of Presentation: Chapter Six Part Three


Download ppt "DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database."

Similar presentations


Ads by Google