Add minimum and maximum cardinality notation to each of the following figures, as appropriate:
a. Figure 2-5
b. Figure 2-10a
c. Figure 2-11b
d. Figure 2-12 (all parts)
e. Figure 2-13c
f. Figure 2-14
Figure 2-11b
FIGURE 2-13 Representing a bill-of-materials structure
Add minimum and maximum cardinality notation
a) Cardinality notation for example of weak entity and its identifying relationship:
The E-R diagram for weak entity and its identifying relationship contains the two entity types such as EMPLOYEE and DEPENDENT.
• The entity “EMPLOYEE” is a strong entity and the entity “DEPENDENT” is a weak entity denoted by the double lined rectangle with the relationship of its owner.
o Here, “Carries” is an identifying relationship between the “EMPLOYEE” and “DEPENDENT” entities.
• The cardinality relationship is “mandatory one” for entity “EMPOLYEE” and “optional many” for entity “DEPENDENT”.
o This is because, an employee carries zero or more dependents and a dependent may or may not be carried by one employee.
• The cardinality relationship representation of E-R diagram (Figure 2-5) is shown below:
b) Cardinality notation for example of relationship type:
• The E-R diagram contains the two entities are “EMPLOYEE” and “COURSE”.
o Here, “Completes” is a relationship between the “EMPLOYEE” and “COURSE” entities.
• The cardinality relationship is “Optional many” for entity “EMPOLYEE” and “optional many” for entity “COURSE”.
o This is because, an employee may or may not complete one or more course and a course may or may not be completed by one or more employee.
• The cardinality relationship representation of E-R diagram (Figure 2-10a) is shown below:
c) Cardinality notation for example of associative entity:
• The E-R diagram contains the two entities are “EMPLOYEE” and “COURSE” with associative entity “CERTIFICATE”.
• The cardinality relationship between entity “EMPLOYEE” and associative entity “CERTIFICATE” is “Mandatory one to Optional many”.
• The cardinality relationship between associative entity “CERTIFICATE” and entity “EMPLOYEE” is Optional many to Mandatory one.
o This is because, one employee may have more than one certificate and a course entity can have more than one certificate for different employees.
• The cardinality relationship representation of E-R diagram (Figure 2-11b) is shown below:
d) Cardinality notation for example of relationship of different degrees:
One-to-one unary relationships:
The E-R diagram contains the entity is “PERSON” with unary relationship “Is Married To”.
• The “Optional one” cardinality relationship exists for the entity “PERSON”.
o This is because; a person may or may not marry a person.
• The cardinality relationship representation of E-R diagram (Figure 2-12a) is shown below:
The E-R diagram contains the entity is “EMPLOYEE” with unary relationship “Manages”.
• The cardinality relationship of entity “PERSON” is “Mandatory one to Optional many”.
o This is because, an Employee may manage one or more features. One work can be managed by one or more employees.
• The cardinality relationship representation of E-R diagram(Figure 2-12a) is shown below:
One-to-one unary relationships:
The E-R diagram contains the entity is “TEAM” with unary relationship “Stands After”.
• The cardinality relationship of entity “TEAM” is “Mandatory one to Mandatory one”.
o This is because; a team may or may not stand for team.
• The cardinality relationship representation of E-R diagram(Figure 2-12a) is shown below:
One-to-one binary relationships:
The E-R diagram contains the two entities is “EMPLOYEE” and “PARKING SPACE” with binary relationship “Is Assigned”.
• The Optional one cardinality relationship exists between the entities “EMPLOYEE” and “PARKING SPACE”.
o An employee may or may not be assigned to one parking place.
• The cardinality relationship representation of E-R diagram(Figure 2-12b) is shown below:
One-to-many binary relationships:
The E-R diagram contains the two entities is “PRODUCT LINE” and “PRODUCT” with binary relationship “Contains”.
• The entity “PRODUCT” will be related to minimum of one product line entity. So the cardinality is “Mandatory one” is applicable.
• The entity “PRODUCT LINE” has one cardinality constraint notation. The number of products can be related to number of product lines. So, the cardinality is “Mandatory more” is applicable.
• The cardinality relationship between entities “PRODUCT” and “PRODUCT LINE” is “Mandatory one to Mandatory many”.
o This is because, a product line must contain one or more product and one or more products must contain one product line.
• The cardinality relationship representation of E-R diagram(Figure 2-12b) is shown below:
Many-to-many binary relationships:
The E-R diagram contains the two entities is “STUDENT” and “COURSE” with binary relationship “Register For”.
• The cardinality relationship between entities “STUDENT” and “COURSE” is “Optional many to Optional many”.
o This is because, a student may be registered for more than one course and a number of courses can be registered by number of students.
• The cardinality relationship representation of E-R diagram(Figure 2-12b) is shown below:
The E-R diagram contains the three entities is “VENDOR”, “WAREHOUSE”, and “PART” with ternary relationship “Supplies”.
• The cardinality relationship between entities “VENDOR”, “WAREHOUSE”, and “PART” is “Mandatory many is optional many”.
o This is because; vendor may or may not supply the parts into warehouse.
• The cardinality relationship representation of E-R diagram(Figure 2-12c) is shown below:
e) Cardinality notation for bill-of-material structure with associative entity:
• The E-R diagram contains the two entities are “ITEM” and “BOM STRUCTURE” with two relationships “Has Component” and “Used In Assemblies”.
• For one relationship:
o The cardinality relationship between entity “ITEM” and associative entity “BOM STRUCTURE” is “Mandatory one to Optional many”.
• This is because; one or more Item may or may not have components for one or more bom structure.
• For another relationship:
o The cardinality relationship between entity “ITEM” and associative entity “BOM STRUCTURE” is “Mandatory one to Optional many”.
• This is because, one or more item may or may not be used in assemblies for one or more bom structure.
• The cardinality relationship representation of E-R diagram(Figure 2-13c) is shown below:
f) Cardinality notation for ternary relationship with associative entity:
• The E-R diagram contains the three entities are “VENDOR”, “PART”, and “WAREHOUSE” with associative entity “SUPPLY SCHEDULE”.
o “PART”, “VENDOR”, and “WAREHOUSE” that are associated with an associative entity called “SUPPLY SCHEDULE”.
o The cardinality relationship between three entities with associative entity is “Optional many to Mandatory one”.
• The cardinality relationship representation of E-R diagram(Figure 2-14) is shown below: