Open In App

How to Represent Composite Attribute in ER Diagram?

Last Updated : 27 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Answer: In an ER diagram, represent a composite attribute by encapsulating its sub-parts in an oval or box connected to the entity.

The process involves a methodical approach to ensure clarity in the visual representation of data models.

  • Identification: Begin by identifying attributes within the entity that exhibit a composite structure, involving multiple sub-parts.
  • Visual Representation: Utilise an oval or box to visually encapsulate the composite attribute’s name, symbolizing its composition.
  • List Sub-Attributes: Enumerate the individual sub-parts of the composite attribute within the designated oval or box. Each sub-attribute represents a distinct component.
  • Connection to Entity: Draw a solid line to establish a visual connection between the composite attribute and the entity to which it belongs. This line signifies the inherent relationship.
  • Labelling Relationships: Clearly label the connecting line with a verb or phrase that aptly describes the relationship between the entity and the composite attribute. For instance, if the composite attribute is ‘Address’ within the ‘Customer’ entity, the line might be label as ‘has Address.’

Examples

Illustrate a hypothetical scenario to provide a concrete understanding. Consider a ‘Person’ entity with a composite attribute ‘Name,’ composed of ‘First Name,’ ‘Middle Initial,’ and ‘Last Name.’ This practical example enhances comprehension.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads