ER Diagram : Introduction
- An Entity Relationship Model is generated through ER Diagram i.e. known as Entity Relationship Diagram which constitutes of various symbols with the help of which entities, attributes and relationships are represented diagrammatically. Each of these components has a separate notation. Let’s discuss them together.
1. Entity : The entity is denoted through a rectangle. These rectangles are named according to the names of entities.
For example : Let the entities be Company, Course, Class and Loan. Then they will be represented as :
2. Weak Entity : When attributes of an entity are not capable of determining the entity uniquely, it is called as weak entity. Weak entity is denoted through a double rectangle.
For example : In a bank, bank branch can be deduced as a weak entity as its attributes are not enough to determine it uniquely.
3. Relationship : The relationship in an Entity Relationship Diagram is denoted through a diamond.
For example : A person works in a company can be described using a relationship as :
4. Attributes : Attributes in Entity Relationship Diagram are denoted through an ellipse.
For example : A university acting as an entity can have multiple attributes as name, location, courses, colleges etc.
5. Key Attribute : Key attribute is a type of attribute which alone can determine the entity uniquely. These are denoted through an ellipse with underline.
For example : A bank customer can be uniquely identified through his/her account number.
6. Multi valued Attribute : Multi valued attributes in Entity Relationship Diagram are denoted through double ellipse.
For example : An account holding customer of bank can have multiple emails, multiple mobile numbers and even multiple addresses(Permanent and Corresponding). They can be termed as multi valued attributes.
7. Composite Attributes : Composite attributes in Entity Relationship Diagram are denoted by linked ellipse.
For example : Consider the name of a person(First Name + Middle Name + Last Name).
8. Derived Attribute : Derived attributes in Entity Relationship Diagram are represented using dashed ellipse.
For example : Consider a class having some students. Each of them can have their name, address and age. We can derive the average age of the student from already present data in the database.
9. Total Participation of Entity in Relation : In this type, every entity is fully involved and linked in the relationship and this participation is denoted using double lines.
10. Partial Participation of Entity in Relation : As the name suggests, some of the entities participates in the relation fully and some of them participates partially. Partial relation is denoted using single line.