You are on page 1of 6

Entity Relational Diagram (ER)

The ER model defines the conceptual view of a database. The ER model defines the
conceptual view of a database and ERD is the visual representation of different data
using conventions that describe how these data are related to each other.
ER diagrams are visual tools that are used in the Entity-Relationship model initially
proposed by Peter Chen in 1976 to create a uniform convention that considers both
relational database and network views.

ER Diagrams Symbols and Notations

Entity
Entities are represented by means of rectangles. Rectangles are named with the entity set they represent.
Attributes
Attributes are the properties of entities. Attributes are represented by means of ellipses. Every ellipse
represents one attribute and is directly connected to its entity (rectangle).

Composite Attribute
If the attributes are composite, they are further divided in a tree like structure. Every node is then
connected to its attribute. That is, composite attributes are represented by ellipses that are connected
with an ellipse.

Multivalued attributes
If an attribute can have more than one value it is called an multivalued attribute. Multivalued attributes
are depicted by double ellipse.

Derived attributes
An attribute based on another attribute. Derived attributes are depicted by dashed ellipse.

Relationship
Relationships are represented by diamond-shaped box. Name of the relationship is written inside the
diamond-box. All the entities (rectangles) participating in a relationship are connected to it by a line.

There are three types of relationship that exist between Entities.

Binary Relationship

Recursive Relationship

Ternary Relationship

Binary Relationship
Binary Relationship means relation between two Entities. This is further divided into three types.

1. One to One : This type of relationship is rarely seen in real world.

2. One to Many : It reflects business rule that one entity is associated with many number of
same entity. The example for this relation might sound a little weird, but this menas that one
student can enroll to many courses, but one course will have one Student.

3. Many to Many : The below diagram


represents that many students can enroll for more than one courses.
Recursive Relationship

If the same entity participates more than once in a relationship it is known as a recursive relationship.
In the below example an employee can be a supervisor and be supervised, so there is a recursive
relationship.

Ternary Relationship
Relationship of degree three is called Ternary relationship.
The University might need to record which teachers taught which subjects in which courses.
Relationships illustrate an association between two tables. In the physical data model, relationships are
represented by stylized lines.

Crow foot notations

You might also like