Reduction of E-R diagrams
Let there be ‘m’ number of entities and ‘n’ number of relationships in a given E-R diagram.
The number of relations, after converting the E-R diagram to relations, is m+n.
Example 1:
In the above example, m = 2 and n = 1. (Two entities and one relationship)
The attributes in the relationship table are the combination of primary keys of the entities that are connected through this relationship.
Table-1 : INSTRUCTOR : ID, I-name, salary
Table-2 : STUDENT : ID, S-name, tot_credits
Table-3 : ADVISOR : I-ID, S-ID
Example 2:
In the above example, the tables are :
Table-1 : INSTRUCTOR : I-ID, I-name, salary
Table-2 : STUDENT : S-ID, I-name, tot_cred
Table-3 : PROJECT : P-ID, P-Name
Table-4 : PROJ-GUIDE : I-ID, S-ID, P-ID