Home » , » ER Model / Diagram in DBMS | Entity Relationship Model in Database

ER Model / Diagram in DBMS | Entity Relationship Model in Database

E.R. Model ( Diagram ) :- An entity is an abstraction from the complexities of a domain| Entity Relationship Model / Diagram is a graphical display of data/entities and relationship between entities|  There are three parts of ER. Diagram like Entity, Attributes & Relationship| When we speak of an entity, we normally speak of some aspect of the real world that can be distinguished from other aspects of the real world| Such as a house, car, computer, printer, etc.
(i) Entity :- Object, Class and Person can be called as Entity| Entity is shown using rectangles. Entity can be student, teachers, employee etc.

Entity is of two types :
i-                    Weak Entity:- Depends on another entity. Displayed using double  rectangles|

ii-                   Strong Entity

(ii) Attributes :- Property and Characteristics of an Entity is called Attributes| Such as name, address, marks, percentage, age, result, subject, price, category, gender etc.
Attributes is displayed by ellipses

Key Attribute : Primary Key of an Entity is called as Key Attribute. Simply main property of an entity is known as Key Attribute| It is represented by using underline in ellipse

Composite Attribute : It can be divided into many parts and have their self attributes.
Example : DOB-Date, Month and Year  &  Address( HN, City, State, Pin, Distt)

Multivalued Attribute – It is displayed using double ellipse

Derived Attribute: It is displayed by Single dash-dash ellipse

(iii) Relationship :- It explained the relationship of two or more entities| Relationship can be of Binary, Recursive and Ternary Relationship.
Simply we can say that relationship tells us that how the data can be shared between two or more entities. Relationship is shown using Diamond Box.

Binary Relationship and Cardinality  :- It shows the relationship between two entities. It can be of three types. Cardinality is the number of instances of an entity.
(i)                  One to One ( 1:1) :- Only One instance of an entity is related to only one instance of an other entity is called one to one relationship| Such as One students admits for only one course

(ii)                One to Many ( 1:N) :-  One instance of an entity is related to more instances of another entity. Such as – One students admits for many courses

(iii)               Many to Many :- More than one instances of one Entity is related to more than one instances of other Entity is called many to many relationship| Like – Many students enrolls for many Courses

Recursive Relationship : A Entity is associated with itself then this is called Recursive Relationship

Ternary Relationship :- Relation between more than two entities or degree three relationship is called ternary|


Post a Comment