Composite Attribute to Relation Schema
A Composite Attribute can be converted into Relation Schema using the following rule;- Create separate columns for every component attributes (only simple attributes) of any composite attribute. Do not include separate column for composite attribute itself.
Figure 1 |
Consider the ER diagram given in Figure 1. Let us consider the Entity Set Employee which has two composite attributes namely, EName and Address with component attributes (FName, LName) and (DoorNo, Street, City, Phone) respectively.
According to the rule, we need to create column for every component attribute and not for composite attribute itself. Hence, the relation schema will like the following;
Employee(EID, FName, LName, DoorNo, Street, City, Phone)
The component attributes are underlined. Note that, the composite attributes are not included.
No comments:
Post a Comment