×

Components of an ER Diagram

An ER Diagram consists of the following components:

  1. Entity
  2. Attributes
  3. Relationships
Components of an ER Diagram

1. Entity

An entity may be an object, place, person, or an event which stores data in the database. In an entity-relationship diagram, an entity is represented by a rectangle. Student, course, manager, employee, patient, etc. are examples of an entity.

Components of an ER Diagram

Entity type: An entity type is a collection or a set of entities having some common attributes. In a database, each entity type is described by a name and list of attributes.

Components of an ER Diagram

Entity set: It is a set (or collection) of entities of the same type which share the similar properties, or attributes.

For example,the group of people who are lecturers in a university can be de?ned as an entity set lecturer. Similarly, the entity set of students might represent the group of all students in the university.

Components of an ER Diagram

An entity can be characterized into two types:

  1. Strong entity: This type of entity has a primary key attribute which uniquely identifies each record in a table. In the ER diagram, a strong entity is usually represented by a single rectangle.
  2. Weak entity:An entity does not have a primary key attribute and depends on another strong entity via foreign key attribute. In the ER diagram, a weak entity is usually represented by a double rectangle.

2. Attributes: An attribute in an Entity-Relationship Model describes the properties or characteristics of an entity. It is represented by an oval or ellipse shape in the ER diagram. Every oval shape represents one attribute and is directly connected to its entity which is in the rectangle in shape.

For example, employee_id, employe_name, Gender, employee_age, Salary, and Mobile no. are the attributes which define entity type Employee.

Components of an ER Diagram

In the ER model, an attribute can be characterized into the following types:

  1. Simple attribute: An attribute which contains an atomic value and cannot be divided further is called a simple attribute.For example, Gender and Salary of a person. It is also represented by an oval.
Components of an ER Diagram
  • Key attribute: An attribute which can uniquely identify an entity in an entity set is called a key attribute. It represents a primary key in the ER diagram. In an Entity-Relationship diagram, the key attribute is denoted by an oval with an underlying line. For example, employee_id will be unique for each employee.
Components of an ER Diagram
  • Composite attribute:An attribute which is a combination of two or more simple attributes is called a composite attribute. In an Entity-Relationship diagram, it is represented by an ellipse, and that ellipse comprises of other ellipses.For example, the Name attribute of an employee entity type consists of First name, Second name, and Last name.
Components of an ER Diagram
  • Derived attribute: An attribute which can be derived from other attributes is called a derived attribute. In an entity-relationship diagram, these attributes are represented by a dashed oval shape. For example, employee_age is a derived attribute as it changes over time and can be derived from another attribute DOB (Date of birth).
Components of an ER Diagram
  • Multi-valued attribute: An attribute which contains more than one value for a given entity. For example, an employee can have more than one mobile number and email address.
Components of an ER Diagram

3. Relationship

A relationship in Entity-Relationship Model is used to describe the relation between two or more entities. It is represented by a diamond shape in the ER diagram. For example, student study in college, employee works in a department. Here, ‘study in’ and ‘works in’ are the relationships.

Degree of Relationship

A relationship where a number of different entity set participate is called as degree of a relationship.

Degree of relationship can be categorized into the following types:

  1. Unary Relationship
  2. Binary Relationship
  3. Ternary Relationship
  4. n-ary Relationship
  1. Unary Relationship: A relationship where a single entity set participates is called as a unary relationship. For example, In a company, an employee manages or supervises another employee.
Components of an ER Diagram
  • Binary Relationship: When two entity set participates in a relationship is called a binary relationship.

It is further categorized into four types:

  1. One-to-One Relationship: When one entity from an entity set A is associated with another entity of entity set B and vice versa. Such type of relationship is called one to one relationship.
Components of an ER Diagram
Components of an ER Diagram
  1. One-to-Many Relationship:When one entity from an entity set A is associated or linked with multiple entities of entity set B, then it is called a one-to-many relationship.
Components of an ER Diagram
  1. Many-to-One Relationship: When more than one entities from an entity set A is associated with one entity of entity set B, then it is called a many-to-one relationship.
Components of an ER Diagram
  1. Many-to-Many Relationship: When more than one entity from an entity set A is associated with many entity of an entity set B. Such types of relationship are called a many-to-many relationship.
Components of an ER Diagram

c) Ternary Relationship: When three entity set participates in a relationship, is called a ternary relationship.

Components of an ER Diagram

d) n-ary Relationship: When more than three entity set involves in a relationship is called an n-ary relationship.


Related Topics

What is a Database

A database is a structured collection of data that is often kept electronically on a computer system. Typically, a database is managed by a database management system (DBMS). Together, the...

9 minutes read.

Difference between DBMS and RDBMS

Database Management System A DBMS is system software which is used to store and manage the data in the database. It was introduced in 1960 for storing the data or information. This system allows...

3 minutes read.

Concurrent Execution of Transaction

In the transaction process, a system usually allows executing more than one transaction simultaneously. This process is called a concurrent execution. Advantages of concurrent execution of a transaction Decrease waiting time or...

4 minutes read.

ER Diagram for Student Management System in DBMS

Entity Relationship diagrams Entity Relationship Diagrams, or ER Diagrams for short, are diagrams that show the relationships among entity sets that are stored in databases. Alternatively said, ER diagrams assist in...

6 minutes read.

DBMS Schema

Schema It is a physical representation of data that appears in the database management system. In simple words, a schema is the structure of any database.It defines how the data is stored...

2 minutes read.

Red-Black Tree Deletion in DBMS

Introduction To Red Black Tree Each node's extra bit in a red-black tree, a type of self-balancing binary search tree, is frequently understood as the color (red or black). The balance...

3 minutes read.

B+ (Plus) Tree in DBMS

What is a B+ tree? The B+ tree is known as a balanced binary search tree. in this tree, we can store the data in the form of nodes. B+ tree...

9 minutes read.

Disadvantages of DBMS

Disadvantages of DBMS With the vast list of advantages, there are some following disadvantages or limitations of the database management system. 1. High Cost The high cost of software and hardware is the...

2 minutes read.

What is Non-Relational Database

Databases can be sorted as either relational or non-relational. Non-relational data sets are now and again alluded to as "NoSQL," which represents Not Only SQL. The principal difference between these...

4 minutes read.

Redundancy in Database Management System

Redundancy in a database management system (DBMS) refers to the duplication of data within the database. This duplication can occur in multiple ways, such as having multiple copies of the...

13 minutes read.

Network model in DBMS

Network model: The many-to-many relationship between the database constraints is represented hierarchically by the Network Model in DBMS. It is a straightforward and straightforward database model. Due to the Network Model...

4 minutes read.

Founder of DBMS

The first database management system was built to automate the business of the General Electric Company. It was built by a small group of programmers. The Integrated Data Store IDS...

4 minutes read.

Normalization in DBMS: 1NF, 2NF, 3NF, BCNF & 4NF with Examples

Normalization is a technique of organizing the data in the database. It is a systematic approach which is used to remove or reduce data redundancy in the tables and remove the...

7 minutes read.

What is RDBMS?

To discuss the Relational Database Management System, there are some terms and concepts you need to know. Database Any collection of related information is called a database. The phone book is...

5 minutes read.

B Tree in DBMS

How to perform Insertion operation in B Tree A new value is inserted at the leaf node. Same like in a binary search tree we traverse from starting root node to...

10 minutes read.

ACID Properties in DBMS

A transaction in a database has the following four properties, known as ACID properties. These properties are used to maintain the consistency of the database in the case of system failure and concurrent...

4 minutes read.

DBMS Data Independence: Logical and Physical

Data Independence in DBMS: Data independence is a concept of DBMS which alters the schema of the database at one level of the database system without altering the schema definition...

2 minutes read.

Trigger in DBMS

Trigger in DBMS: A trigger is a procedure of SQL statements, which is automatically fired when the DML statements are executed on the table of the database. Triggers are the...

3 minutes read.

Advantages of RDBMS

The relational database management system collects related data stored in tabular format. The data is stored in rows and columns, where rows usually represent the individual entity of the collected...

6 minutes read.

Super Key in DBMS

Super Key in DBMS: The super key is a column or a set of columns in the database table, which uniquely identifies the tuple or row of the same table....

2 minutes read.