Download presentation
1
Database Management System
Chapter 4-2 ER Diagram (Cont.) Adisak Intana Lecturer ER Diagram
2
Tranform E-R Diagram to Relation
One-to-one relationship Key2 Key1 R1 Entity2 Entity1 OR: Entity1(Key1, … , Key2) Entity2(Key2, … ) Relation: Entity1(Key1, … ) Entity2(Key2, … , Key1) ER Diagram
3
Tranform E-R Diagram to Relation
Example PK# Em# assign Parking Place Employee Relation: Employee(EM#, … ) ParkingPlace(PK#, … , EM#) OR: Entity1(EM#, … , PK#) Entity2(PK#, … ) ER Diagram
4
Tranform E-R Diagram to Relation
One-to-Many Relationship Key2 Key1 1 R1 M Entity2 Entity1 Relation: Entity1(Key1, … ) Entity2(Key2, … , Key1) ER Diagram
5
Tranform E-R Diagram to Relation
Many-to-One relationship Key2 Key1 M R1 1 Entity2 Entity1 Relation: Entity1(Key1, … , Key2) Entity2(Key2, … ) ER Diagram
6
Tranform E-R Diagram to Relation
One-to-many relationship T# ST# 1 M R1 Advisor Student Relation: Student(ST1, … , T#) Advisor(T#, … ) ER Diagram
7
Tranform E-R Diagram to Relation
Many-to-Many relationship Key2 Key1 M R1 N Entity2 Entity1 Relation: Entity1(Key1, …) R1(Key1,Key2,…) Entity2(Key2, … ) ER Diagram
8
Tranform E-R Diagram to Relation
Many-to-Many relationship Sub# ST# M Regist N Subject Student Relation: Student(ST#, …) Regist(ST#,Sub#,…) Subject(Sub#, … ) ER Diagram
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.