Download presentation
Presentation is loading. Please wait.
1
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 6 Database Design Using Entity- Relationship Models
2
© 2002 by Prentice Hall 2 Entities & Relationships Entities are those things that users want to track Relationships define how entities are associated with each other
3
© 2002 by Prentice Hall 3 Representing an Entity
4
© 2002 by Prentice Hall 4 Representing an Entity in DK/NF
5
© 2002 by Prentice Hall 5 Entity with Appropriate Normalization
6
© 2002 by Prentice Hall 6 Representing a ‘Has-a’ Relationship 1:1 and 1:N relationships are saved by creating foreign keys A foreign key is when you take the primary key from one table (on the one-side) and place it into another table (on the many-side or into the other table for a 1:1 relationship)
7
© 2002 by Prentice Hall 7 Representing a 1:1 Relationship The foreign key can go on either side BUT it is on one side only
8
© 2002 by Prentice Hall 8 Representing 1:N Relationships In each of the following examples, the foreign key goes to the right (into the many-side)
9
© 2002 by Prentice Hall 9 Foreign Key Placement ProfessorName goes into the Student table as a Foreign Key
10
© 2002 by Prentice Hall 10 Representing a N:M Relationship N:M relationships are saved by creating a new table. The primary key of the new table is a combination key composed of the primary keys from each of the tables involved in the relationship.
11
© 2002 by Prentice Hall 11 Representing a M:N Relationship
12
© 2002 by Prentice Hall 12 An E-R Diagram Example
13
© 2002 by Prentice Hall 13 The Representation of the E-R Diagram Example on previous slide
14
© 2002 by Prentice Hall 14 Common Relationship Patterns Tree Simple Networks Complex Networks Bills of Materials
15
© 2002 by Prentice Hall 15 Tree Relationship Pattern A tree relationship pattern is a form of hierarchy –The data structure elements have only one-to-many relationships
16
© 2002 by Prentice Hall 16 A Tree Relationship Example
17
© 2002 by Prentice Hall 17 Simple Network Relationship Pattern A simple network relationship pattern data structure has only 1:N relationships. The elements may have more than one parent as long as the parents are of different types
18
© 2002 by Prentice Hall 18 Example of a Simple Network Relationship Pattern
19
© 2002 by Prentice Hall 19 A Complex Network Relationship Pattern A complex network relationship pattern is where the data structure has at least one N:M relationship
20
© 2002 by Prentice Hall 20 Example of a Complex Network Relationship Pattern
21
© 2002 by Prentice Hall 21 Bills of Materials Relationship Patterns Bills of materials relationship patterns are data structures that occur frequently in manufacturing applications. Parent relations are viewed as composites of the child relations.
22
© 2002 by Prentice Hall 22 Example of a Bills of Material Relationship Pattern
23
© 2002 by Prentice Hall 23 David M. Kroenke Database Processing Eighth Edition Chapter 6 Database Design Using Entity- Relationship Models
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.