Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
COS 346 Day 7 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 Agenda • Assignment Two is Due • Assignment 3 Posted Due next Monday Feb 16 • Assignment 4 will be posted later this week and will be due Feb 23 • Quiz 1 Mar 2 (note change!) – DP Chap 1-6, SQL Chap 1 & 2 • Capstone Proposals Due next Monday, Feb 16 – Must be a database related capstone – Capstone Project Description sp 09.htm • Continue Discussion on Data Modeling with the EntityRelationship Model DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-2 David M. Kroenke’s Database Processing: Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship Model Part Two DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-3 Creating models • Indentify entities – Attributes – Functional dependencies – Keys • Indentify relationships between entities – Indentifying or non identifying • Id-dependant? – Strong or weak – Subtype • Indentify Max cardinalities DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition •© 2006 Identify Min cardinalities Pearson Prentice Hall 5-4 Strong Entity Patterns: 1:1 Strong Entity Relationships DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-5 Strong Entity Patterns: 1:1 Strong Entity Relationships DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-6 Strong Entity Patterns: 1:N Strong Entity Relationships DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-7 Strong Entity Patterns: 1:N Strong Entity Relationships DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-8 Strong Entity Patterns: N:M Strong Entity Relationships DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-9 Strong Entity Patterns: N:M Strong Entity Relationships DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-10 Strong Entity Patterns: N:M Strong Entity Relationships DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-11 ID-Dependent Relationships: The Association Pattern Note the Price column, which has been added. DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-12 ID-Dependent Relationships: The Association Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-13 ID-Dependent Relationships: The Multivalued Attribute Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-14 ID-Dependent Relationships: The Multivalued Attribute Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-15 ID-Dependent Relationships: The Multivalued Attribute Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-16 ID-Dependent Relationships: The Multivaled Attribute Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-17 ID-Dependent Relationships: The Archtype/Instance Pattern • The archtype/instance pattern occurs when the ID-dependent child entity is the physical manisfestation (instance) of an abstract or logical parent: – PAINTING : PRINT – CLASS : SECTION – YACHT_DESIGN : YACHT – HOUSE_MODEL: HOUSE DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-18 ID-Dependent Relationships: The Archtype/Instance Pattern Note that these are true ID-dependent relationships - the identifier of the parent appears as part of the composite identifier of the IDdependent child. DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-19 ID-Dependent Relationships: The Archtype/Instance Pattern Note the use of weak, but not IDdependent children. DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-20 David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10th Edition) End of Presentation: Chapter Five Part Two DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-21 David M. Kroenke’s Database Processing: Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship Model Part Three DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-22 Mixed Patterns: The Line-Item Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-23 Mixed Patterns: The Line-Item Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-24 Mixed Patterns: Other Mixed Patterns • Look for a mixed pattern where: – A strong entity has a multivalued composite group, and – One of the elements of the composite group is an identifier of another strong entity DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-25 Mixed Patterns: Other Mixed Patterns DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-26 Mixed Patterns: Other Mixed Patterns DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-27 Mixed Patterns: The For-Use-By Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-28 Mixed Patterns: The For-Use-By Pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-29 Recursive Relationships • A recursive relationship occurs when an entity has a relationship to itself DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-30 Recursive Patterns: 1:1 Recursive Relationship DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-31 Recursive Patterns: 1:N Recursive Relationship DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-32 Recursive Patterns: N:M Recursive Relationship DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-33 David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10th Edition) End of Presentation: Chapter Five Part Three DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-34 David M. Kroenke’s Database Processing: Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship Model Part Four DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-35 Highline University • The Highline University [HU] database will track such entities as: – Colleges – Departments – Faculty – Students • We have gathered a set of HU reports that will be the source documents for a data model DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-36 The College Report DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-37 You cannot access the slides from computers outside the UMS network (ip 130.11.x.x). I had to limit the access due to copyright on the materials. It is a legal iss Data Model from the College Report This is a weak, but not ID-dependent, 1:N relationship DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-38 The Department Report DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-39 The DEPARTMENT / PROFESSOR Relatioship: Alternate Model 1: Using an N:M Relationship This is an N:M relationship DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-40 The DEPARTMENT / PROFESSOR Relatioship: Alternate Model 2: Using a 1:N Relationship This is a 1:N relationship DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-41 The DEPARTMENT / PROFESSOR Relatioship: Alternate Model 3: Using an Association Pattern This is an association pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-42 The DEPARTMENT / PROFESSOR Relatioship: Alternate Model 4: Using a Association Pattern and a 1:N Relationship This is a 1:1 relationship This is an association pattern DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-43 The Department Major Report DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-44 Data Model with STUDENT Entity DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-45 The Student Acceptance Letter DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-46 Data Model with Advises Relationship DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-47 Final Highline University Data Model DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-48 Visio Version College PK CollegeName DeanName Phone Building Room u:R d:R College_Department_FK1 Professor Department PK PK DepartmentName Chairs/Chaired BY Phone Totalmajors Building Room ProfessorName OfficeNumber Phone building u:R d:R Professor_Appointment_FK1 u:R d:R Major Department_Appointment_FK1 Student PK StudentNumber Title StudentName HomeStreet HomeCity HomeState HomeZip Phone Appointment_Student_FK1 u:R d:R u:R d:R Appointment Title terms u:R d:R DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-49 David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10th Edition) End of Presentation: Chapter Five Part Four DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-50