What is ER Model? Components Of ER Model

What is ER Model? Components Of ER Model

In this tutorial, we will discuss what is ER Model is and also the components of ER Model, which include- Entity, Attributes in DBMS.

ER Model

The ER model is the algorithm or the graphical representation of entities, which displays the data graphically. The ER Model shows the connection between two data, that is how the structure of the database is described. The ER Model helps to easily identify the relation of entities to entities(Object). ER Diagram is made of several components

Entity

Entity means real-world things that can be either living or non-living, which is easily identified.

The entity is an object which can be a person, place, vehicle, school, college, company, animal, insects anything in this world living or non-living objects.

The entity is a single object and if several entities are there then it is an entity set. The information about an entity is known as attributes.

For example, if you have an entity student then the names, class, roll no, dob are the attributes of the entity.

The Set of Entities is the collection of similar types of entities that share the same attributes. For example, the following diagram shows the entity set.

What is ER Model? Components Of ER Model

The entity is represented by a rectangle symbol and the Set of Entity is also defined by a rectangle symbol

What is ER Model? Components Of ER Model

Types of Entity

  1. Strong Entity

Strong Entities are the entities that have attributes, so they can be used as Candidate Key, Primary Key, Super Key to be identified in a large database.

For example, Employee is an Entity, and Emp_name, Emp_Id, Emp_Salary, Emp_Dob, Emp_Address are the attributes of Entity Employee.

What is ER Model? Components Of ER Model

  1. Weak Entity

Weak Entity is just opposite to Strong Entity as it doesn’t have enough attributes to form a primary key.

What is ER Model? Components Of ER Model

A weak entity depends on another entity.

Attributes

The entity has some information about it and this information is called Attributes. Therefore, Attributes are the properties of an Entity.

For Example:

Student entities with some information like Stu_name, Stu_class, Stu_age, Stu_addr, Stu_phone_no, etc. are the attributes.

Types of Attributes.

  • Key Attributes.
  • Stored And Derived Attributes.
  • Simple and Composite Attributes.
  • Single Value and Multivalued Attribute.

Key Attribute

A key attribute is used to uniquely identify an entity from a large no of the entity sets.

For example, In a college, there are several students so if we need a particular student from the whole college then we need that student’s roll no of a class which is unique for all students and this roll no is the key attribute, which helps to identify the student from the college entity set.

What is ER Model? Components Of ER Model

Simple And Composite Attribute.

Simple Attributes are attributes that cannot be divided into parts, they are also known as atomic values.

For example, the phone number of a student is 10 digits and cannot divide it is fixed, another example is the roll no of a student which is also cannot divide into parts.

Composite Attributes

Composite attributes are the attributes that can be subdivided into many parts

For example, the Address can be divided into the country, state, city, zip code, street no, house no, etc.

What is ER Model? Components Of ER Model

Single Value and Multivalued Attributes

Single value attributes are those attributes, which have only one value, which means a single object will have a single value.

For example, students will have only one date of Value or only one Age. or students have only one roll_no, which helps them to uniquely identify.

Multivalued attributes are those attributes that have more than one value, it is just opposite to a single value attribute, you can have multiple values.

For example, A Student or any person can have multiple phone_no, Email_id, etc.

What is ER Model? Components Of ER Model

Stored and Derived Attributes

Stored Attributes are those attributes, which are stored physically in the database and we cannot derive another value from it.

For example Stu_id, Stu_rollno, Stu_course_id. We cannot derive values of these attributes using other attributes.

Derived Attributes are those attributes that are taken from other attributes or which are derived from another attribute. Which are not physically stored in the database, we have to derive them from other attributes.

For example, how can we calculate the age of a person because we know only the date of birth, so it is not physically stored in the database we have to calculate his Age from his DOB

The DOB birth of a person is 3/12/1992 then after calculating his age from the current month, year, and date, we will get his Age and this Age is a derived attribute because it is derived from another attribute.

What is ER Model? Components Of ER Model

 

You can also read these topics:

Advantages and Disadvantages of Database

What are the Database Keys in DBMS?

What is Database?

What is DBMS?

Leave a Comment

Your email address will not be published. Required fields are marked *