what is ER (entity relationship) model in DBMS


Ø  ER model (entity relationship model) – entity relationship model is based on real world scenario and enities.ER model create entity set relationship set general attribute and their constraints. ER model is best uses for conceptual design at a database. This model is base on –
a)     Entity and their attribute
b)     Relationship among two or more entity
Here are some shape that are used to create ER diagram –
Rectangle: Represents Entity sets.
Ellipses: Attributes
Diamonds: Relationship Set
Lines: They link attributes to Entity Sets and Entity sets to Relationship Set
Double Ellipses: Multivalued Attributes
Dashed Ellipses: Derived Attributes
Double Rectangles: Weak Entity Sets
Double Lines: Total participation of an entity in a relationship set
A sample E-R Diagram:
Multivalued Attributes: An attribute that can hold multiple values is known as multivalued attribute. We represent it with double ellipses in an E-R Diagram. E.g. A person can have more than one phone numbers so the phone number attribute is multivalued.
Derived Attribute: A derived attribute is one whose value is dynamic and derived from another attribute. It is represented by dashed ellipses in an E-R Diagram. E.g. Person age is a derived attribute as it changes over time and can be derived from another attribute (Date of birth).
E-R diagram with multivalued and derived attributes:
Total Participation of an Entity set:
A Total participation of an entity set represents that each entity in entity set must have at least one relationship in a relationship set. For example: In the below diagram each college must have at-least one associated Student.

1.      Entity – A entity is an ER models real world entity having property called attribute every attribute is defined by its set of value called domain.
Example – school database, a student has various attribute like – name, age, and id.
2.      Relationship – the logical association among entity is called relationship, relationship are mapped with entities in various ways. Mapping cardinalities define the number of association between two entities.

Relationship Set

A set of relationships of similar type is called a relationship set. Like entities, a relationship too can have attributes. These attributes are called descriptive attributes.

Degree of Relationship

The number of participating entities in a relationship defines the degree of the relationship.
·         Binary = degree 2
·         Ternary = degree 3
·         n-ary = degree