Showing posts with label ER Model. Show all posts
Showing posts with label ER Model. Show all posts

Wednesday 20 April 2022

ER [Entity–relationship] Model

ER Model is a popular high-level (conceptual) data model. It is an approach to designing Semantic Conceptual schema of a Database. ER model allows us to describe the data involved in a real-world environment in terms of objects and their relationships, which are widely used in design of database. ER model provides preliminary concepts or idea about the data representation which is later modified to achieve final detailed design.

Important concepts/notions used in ER modeling are-

Entity 

It is an object in real-world or some idea or concept which can be distinguished from other objects.

Ex.: person, school, class, department, weather, salary, temperature etc.

Entity has independent existence. 

Entity type

Each entity belongs to an Entity type that defines the structure.

Entity Set 

It is a Collection of similar objects.

Attribute

Reflects a property of an object or entity. We have following types of attributes.

> Simple attribute

> Composite attribute

> Single valued attribute

> Multi-valued attribute

> Derived attribute

> Stored attribute

Key

Is an Attribute of an entity type whose value can uniquely identify an entity in a set.

Relationship

The association between entities is known as relationship.

Domain of an attribute

The set of possible values is known as domain of an attribute



Degree of a Relationship

Degree is the number of entity type participate in a relationship. 
If there are two entity types involved it is a binary relationship type
eg: Manager manages employee

If there are three entity types involved it is a ternary relationship type  

Cardinality of a relationship

Relationships are rarely one-to-one. 
For example, a manager usually manages more than one employee. This is described by the cardinality of the relationship, for which there are four possible categories.