Features Of Entity-Relationship Model

Entity-Relationship Model: 

E-R Model Definition:

Entity-Relationship Model is a logical representation of data in an organization. It views the entire system as a collection of entities related to one another. It is used to describe the elements of a system and their relationship.E-R models represent different things as entities. The connections among different entities are represented by relationships. These entities and relationships can be transformed into relational models. This model can be designed in the database using the relation model. It was introduced by PETER CHEN in 1976

Advantages of  E-R Model:

The advantages are as follows:
1. Conceptual Simplicity:
E-R model represents the concept of a database along with its entities and relationship in an easy way. It becomes even easier to create and manage the complex database.

2:Visual Representation:
E-R model provides a visual representation of data and the relationship among data.

3. Effective Communication Tool:
The database designer can Use the E-R model to get different views of data as seen by programmers.

4.Integrated with Relational Database Model:
E-R model is well integrated with the relational  database model

Example of E-R Model:

Suppose we design a company database. In this database, the employees will be an entity with attributes like name, address, id, age, etc. The address can be another entity with attributes like a city, street name, pin code, etc and there will be a relationship between them.

Component of E-R model:

1. Entity:
An entity is a person, place, thing, or event for which data is collected and maintain. For example, a library may contain data about different entities like BOOK and MEMBER...

 Two types of entity:

1. the weak entity 
 Any entity that can exist only if another entity exists is known as a weak entity.
for example:
we want to store the data of a student after assigning a class to him. It means that the data cannot be stored if the CLASS entity does not exist. In other to store the record of the students, we first need to create an entity that represents a class. Here, the STUDENT is a weak entity because it depends upon the CLASS entity.
2. Strong entity:
Any entity that does not depend on another entity.

for example:
we want to store the data of a student after assigning a student-ID to him. It means that the data can be stored because every student has a different student-ID. It never depends on other entities.

2.Attributes:

Properties that describe the entity's characteristics are called Attribute.

Types of Attribute:

1. Simple Attribute:
An Attribute that cannot be subdivided into smaller components is called a Simple Attribute. It is also known as the atomic attribute.
for example:
A person can have only one gender male or female and one date of birth

2. Composite Attribute:
An attributes that can be divided into smaller components is known as a composite attribute.
for example:
The address is an example of a composite attribute. It can be subdivided into street, city, country. Similarly, A phone number can be subdivided into Area Code and Number.

3.Single valued Attribute:
An attribute that may contain a single value is called a single-valued attribute.
for example:
The age of a person is a single-valued attribute. Gender is also a single-valued attribute.

4.Multi Valued Attribute:
An attribute that may contain two or more values is called a multi-valued attribute.
for example:
A person can have two or more college degrees. Similarly, an employee may have many skills. The multi-Vlaued attribute is represented by a double-line oval.
 
5.Stored Attribute:
An attribute that is stored in a database is known as a stored database.
Most of the attributes are stored attributes. These are stored and accessed from databases.

6.Derived Attribute:
An attribute that is not stored but derived from another value is known as a derived attribute.
for example:
ROLL NO, NAME, and DATE of BIRTH of a student can be stored in the database. The age of a student can be derived from the date of birth. A derived attribute is indicated by using an ellipse with a dashed line or a dotted line oval.

7.Identifiers:
The identifier is an attribute that identifies an entity instance among other instances in the entity class.
for example:
There may be many instances of the STUDENT entity class. But each student is identified by his ROLL NO or Registration No. Similarly, an employee in the EMPLOYEE entity class is identified by his EMPLOYEE ID, etc 

RELATIONSHIPS:
A relationship is a logical connection between different kinds of entities. The entities that participate in a relationship for processings are called Participants. The relationship may be between different entities or between an entity and itself. A relationship is established based on interaction among entities.
for example:
A relationship exists between a STUDENT and TEACHER because the teacher teaches the students.

Types of Relationship:

The types of relationship are as follow:

1. Unary Relationship:

A unary relationship defines as .when both participants in the relationship have the same entity.

2. Binary Relationship:

A binary relationship defines when two entities are involved in the relationship.

  • One one relationship
  • one to many relationships
  • many to many relationships
ONE TO ONE RELATIONSHIP:


When only one instance of an entity is associated with the relationship then it is said to be one relationship.


ONE TO MANY RELATIONSHIP:

When only one instance of an entity is associated with many relationships then it is said to be one relationship.
for example:

A student read many books.


MANY TO MANY RELATIONSHIP:

When many instances of an entity are associated with many relationships then it is said to be a one-one relationship.
for example:

many employees work at many objects

3.ternary Relationship:

A ternary relationship defines as when two entities are involved in the relationship.

Relationship Class:

A relationship class is an association among different entity classes. A relationship instance is an association among entity instances. 

Minimum Cardinality:
The minimum number of instances of one entity that may be associated with each instance of another entity is said to be minimum cardinality. If the minimum cardinality is zero, participation is optional. If the minimum cardinality is one, participation is mandatory too.

Maximum Cardinality:
The maximum number of instances of one entity that may be associated with each instance of another entity is said to be maximum cardinality.

Comments

Popular posts from this blog

Modern scenario of information technology:

Deadlock Questions and Answers pdf

What is the bus interconnection?