It is a high level data model diagram which defines the conceptual view of the database. It indicates the relation among entities.
Before making the actual database, first the ER-diagram is drawn to show the relations and many more things.
Components of ER Diagram:
1) Entity
i) It is a real-world object.
ii) It can be physical.
iii) It can be logical.
Entity Set - It is a set (or collection) of entities of the same type which share the similar properties or attributes.
An entity can be characterized into two types:
i) Strong Entity -
-> It has a Primary Key.
-> It is not dependent.
-> They are shown in single rectangle
ii) Weak Entity -
-> It doesn't have the sufficient attributes to form Primary Key.
-> It is dependent on the Strong Entity.
-> They are shown in double Rectangle.
Total Participation - Weak Entity always has total participation with the Relationship. This means that each entity in the entity set must compulsorily participate in at least one relationship instance in that relationship set.
2) Attributes - They are the properties that describe the entity.
An attribute can be characterized into:
1) Simple Attributes: They are represented by oval.
Example
2) Multi-valued Attributes: Multiple values for a single attribute. They are represented by double oval.
Example
3) Single-Valued Attributes: Each and every entity will have only one value.
Example - ID
4) Composite Attributes: Those attributes that can be divided further.
5) Derived Attributes: Those attributes whose values are derived from another attribute. They are represented by dotted oval.
Example
Age is a derived attribute since age can be derived from the Date of Birth.
6) Key Attribute: Attribute which can uniquely define the whole tuple is called a Key Attribute.
3) Relationship
It indicates how each and every entity is related with every other entity.
Degree of Relationship: A relationship where a number of different entity set participate is called as degree of a relationship.
Degree of relationship can be categorized into the following types:
1) Unary - Only one Entity set participates in a relationship.
2) Binary - Two Entity Sets participate in a relationship.
It is further divided into four types:
i) One-to-One:
3) Ternary - When three entity sets participate in a relationship.
4) n-ary - When more than three entity set involves in a relationship, it is called n-ary relationship.
Summary of ER-Diagram Symbols
1) Entity or Strong Entity:
That's all for today.
Thank You.
Hope to see you in my next article...
Top comments (0)