Download presentation
Presentation is loading. Please wait.
1
© 2002 by Prentice Hall 1 SI 654 Database Application Design Winter 2003 Dragomir R. Radev
2
© 2002 by Prentice Hall 2 David M. Kroenke Database Processing Eighth Edition Chapter 6 Database Design Using Entity- Relationship Models
3
© 2002 by Prentice Hall 3 Entities & Relationships Entities are those things that users want to track Relationships define how entities are associated with each other
4
© 2002 by Prentice Hall 4 Representing an Entity
5
© 2002 by Prentice Hall 5 Representing an Entity in DK/NF
6
© 2002 by Prentice Hall 6 Entity with Appropriate Normalization
7
© 2002 by Prentice Hall 7 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)
8
© 2002 by Prentice Hall 8 Representing a 1:1 Relationship The foreign key can go on either side BUT it is on one side only
9
© 2002 by Prentice Hall 9 Representing 1:N Relationships In each of the following examples, the foreign key goes to the right (into the many-side)
10
© 2002 by Prentice Hall 10 Foreign Key Placement ProfessorName goes into the Student table as a Foreign Key
11
© 2002 by Prentice Hall 11 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.
12
© 2002 by Prentice Hall 12 Representing a M:N Relationship
13
© 2002 by Prentice Hall 13 An E-R Diagram Example
14
© 2002 by Prentice Hall 14 The Representation of the E-R Diagram Example on previous slide
15
© 2002 by Prentice Hall 15 Common Relationship Patterns Tree Simple Networks Complex Networks Bills of Materials
16
© 2002 by Prentice Hall 16 Tree Relationship Pattern A tree relationship pattern is a form of hierarchy –The data structure elements have only one-to-many relationships
17
© 2002 by Prentice Hall 17 A Tree Relationship Example
18
© 2002 by Prentice Hall 18 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
19
© 2002 by Prentice Hall 19 Example of a Simple Network Relationship Pattern
20
© 2002 by Prentice Hall 20 A Complex Network Relationship Pattern A complex network relationship pattern is where the data structure has at least one N:M relationship
21
© 2002 by Prentice Hall 21 Example of a Complex Network Relationship Pattern
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.