---
title: "ER diagram: product and components"
subject: "Database Management System"
chapter: 2
key: "semester_6/database_management_system:er-product-component"
source: https://www.bctengineer.com/q/semester_6/database_management_system/er-product-component
site: BCT Engineering
---

# ER diagram: product and components

Database Management System · Chapter 2: Data Models

- Asked in: 2070 Magh
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/database_management_system/er-product-component
- Whole chapter: https://www.bctengineer.com/md/semester_6/database_management_system/chapter-2

## Question

Draw an ER diagram for the following. [The question text is not printed; the page gives only the label and the solution diagram: Product (p_no, desc, cost) is comprised of Component (c_no, desc, measure) in a many-to-many relationship; Component has a recursive relationship 'make' with attribute no.]

## Short answer

Entities: Product (p_no, desc, cost), Component (c_no, desc, measure). Relationships: Product comprised_of Component (M:N), Component has recursive make (assembly, part) with attribute no.

## Answer

The diagram contains two entities, a many-to-many relationship, and a recursive relationship on Component.

#### Entities and attributes
- **Product** (**p_no**, desc, cost).
- **Component** (**c_no**, desc, measure).

#### Relationships
1. **comprised_of** between Product and Component: M : N. A product is made of many components, and one component can be used in many products.
2. **make** on Component (recursive, unary): a component is made from other components. The relationship has the attribute **no** (how many units of the sub-component are used). Roles: *assembly* and *part*.

#### ER diagram
```text
 (p_no)(desc)(cost)
        \  |  /
       [ Product ]
           |
           M
      <comprised_of>
           |
           N
       [Component]----(c_no)
        |  |   |  \
        |  |   |   (desc)(measure)
        |  |   +---------+
        |  |             |
        1  +----<make>---+  (no)
      (assembly)  N     (part)
```

The recursive line leaves Component and returns to it, labelled with the roles. In the relational schema this becomes: Product(p_no, desc, cost), Component(c_no, desc, measure), Comprised_of(p_no, c_no), Make(assembly_c_no, part_c_no, no).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why is 'comprised_of' between Product and Component M : N?
   A. Each component belongs to exactly one product
   B. Each product has exactly one component
   C. A product has many components and a component can be used in many products
   D. Because Component has a recursive relationship
   Answer: C. Both sides can have many, so the relationship is many-to-many. (Key point: Product-Component cardinality)

2. What does the recursive relationship 'make' on Component mean?
   A. A component is made from other components, with roles assembly and part
   B. A component is made from products
   C. Two different entities are linked
   D. It duplicates the Component entity
   Answer: A. A recursive (unary) relationship links an entity to itself using roles. (Key point: Recursive relationship)

3. What does the attribute 'no' on 'make' record?
   A. The component number c_no
   B. The number of products using the component
   C. How many units of the sub-component are used
   D. The primary key of Product
   Answer: C. no is a relationship attribute giving the quantity of part used in the assembly. (Key point: Attribute no)

4. How is 'make' mapped in the relational schema?
   A. Make(assembly_c_no, part_c_no, no)
   B. Make(p_no, c_no)
   C. An extra column added to Product
   D. It is dropped since it is recursive
   Answer: A. The recursive relation becomes a table with two component keys plus attribute no. (Key point: Relational mapping)

## Related in Database Management System

- [ER diagram: hospital management](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Aer-hospital) — Database Management System, chapter 2
- [ER diagram: cricket tournament](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Aer-cricket-tournament) — Database Management System, chapter 2
- [ER diagram: employee, skill, machine](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Aer-employee-skill-machine) — Database Management System, chapter 2

## Related in other subjects

- [Rural area 22000 L/day river supply (question text cut)](https://www.bctengineer.com/question.md?key=semester_5%2Fwater_supply_engineering%3Ares-a76) — Water Supply Engineering, chapter 7
- [Why n-type has many conduction electrons](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_engineering_material%3Antype-electrons-conduction-band) — Electrical Engineering Material, chapter 6
- [One-to-many relationship using collections](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aone-to-many-collection-generic-classes) — Object Oriented Analysis and Design, chapter 4
- [Components that make up the Web](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Acomponents-of-web) — Web Technology, chapter 2
