Converting ER to Relational Model Flashcards
Convert 1 : * relationship into relational model form…
Create a relation for each entity with all original attributes. Add the foreign key to the ‘many’ relation.
Convert 1:1 (Mandatory,Mandatory) to relational model form…
Combine entities into 1 relation that holds combined attributes. The PK can be from either entity.
Convert 1:1 (Optional,Mandatory) to relational model form…
Create relations from entities. FK added to Mandatory relation since it will never be null.
Convert 1:1 (Optional,Optional) to relational model form…
Create 2 relations from entities, FK can be added to either relation.
Convert * : * relationship into relational model form…
Relation represents the relationship, the relation PK is a composite key of the 2 entity PK’s, the relation attributes come from the relationship.
What is the PK in * : * relational form is not uniquely distinguishable?
Add attribute to the PK to ensure uniquely distinguishable.
Convert Recursive 1 : * to relational form…
Create relation and create PK from ‘many’ role. For example, Postgraduate mentors many Undergraduates, UndergarduateMentorID would be added as FK.
Convert Recursive 1 : 1 to relational form…
Same as conventional 1 : 1 but with the implementation of roles.
Convert Recursive * : * to relational form…
Relation represents the relationship, PK is a composite of keys of both roles.
Convert complex relationship into relational form…
Take attributes from relationship and PK’s from all associated entities, and create a new relation. PK of the new relation is a composite key of the ‘many’ entities in the relation.
Convert Superclass / Subclass entities to relational form…
Either keep superclass, keep subclass, keep both.
Convert 1 : 1 weak entity into relational form…
Strong entity subsumes all weak entity attributes.