COMP 378 Lecture Notes - Lecture 2: Associative Entity, Unique Key, Foreign Key

97 views2 pages

Document Summary

Give a simple example of an e-r diagram for each of the following concepts: associative entity. When we have many-to-many relationship in er diagram we must use associative entity to resolve this state. This way we will split one many-to-many relationship with two one-to-many relationships. On images below we can see initial er diagram with associative entity between entities student and course. On second image we have converted this entity to new table called student_course_mapping: weak entity. Weak entity is represented in er diagram as double outlined box. Weak entity cannot be identified by its attributes alone. We must use foreign key of some other entity to combine with its attributes to make primary key. On image below weak entity transaction cannot stay as independent. Trans_no with acc_no attribute from account table in order to create primary key: unary relationship. Unary relationship is relationship when both participants in relationship is the same entity.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents