The Entity Relationship Diagram

Posted By on September 30, 2014


Download PDF
Primary Keys for Relationship Sets
Other Styles of E-R Diagram

The Entity Relationship Diagram

We can express the overall logical structure of a database graphically with an E-R diagram.

Its components are:

  • rectangles representing entity sets.
  • ellipses representing attributes.
  • diamonds representing relationship sets.
  • lines linking attributes to entity sets and entity sets to relationship sets.

In the text, lines may be directed (have an arrow on the end) to signify mapping cardinalities for relationship sets. Figures 2 to 4 show some examples.

  
Figure 1: An E-R diagram

  
Figure 2: One-to-many from customer to account

  
Figure 3: Many-to-one from customer to account

  
Figure 4: One-to-one from customer to account

Go back and review mapping cardinalities. They express the number of entities to which an entity can be associated via a relationship.

The arrow positioning is simple once you get it straight in your mind, so do some examples. Think of the arrow head as pointing to the entity that “one” refers to.

 

Primary Keys for Relationship Sets
Other Styles of E-R Diagram

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby

Website: http://world4engineers.com