What is the Entity Relationship Model? 

Complex real-world applications call for large volumes of data. Therefore, it is necessary to build a great database to store data safely and coherently. The ER data model aids in the process of database design. It helps outline the structure of an organization’s database by understanding the real-world interactions of objects related to the data. For example, if a school is tasked to store student information, then analyzing the correlation between the students, subjects, and teachers would help identify how the data needs to be stored.

Formulating an ER Model in DBMS is an ideal practice before building the database. Its diagrammatic representation is called the ER diagram, which offers a graphical view of the principles the model upholds.

What is the ER Diagram? 

Founded by Peter Chen in 1976, ER Diagram stands for Entity Relationship Diagram. It can also be referred to as an ERD. It closely resembles a flowchart to the untrained eye but has many specific notations and symbols based on the ER model components, the three most important ones being:

  • Entities
  • Attributes
  • Relationships

An ERD exhibits the different entities stored in the database, the attributes that describe them, as well as their relationships. This, in turn, creates the logical structure of the database.

Benefits of Using ERDs

"Benefits of Using ERDs"
  • Helps simplify the process of understanding, constructing, and fortifying complex databases.
  • Visually represents many of the key elements of the ER model, making it easier to grasp the framework of the database to be built.
  • Can be useful in terms of efficient business management and creating strategies.
  • Sometimes, there may be ambiguities and extraneous processes in an enterprise’s workflow. Drawing out an ERD can help you eliminate and refine them.
  • Database designers can effectively communicate their plans using an ER diagram.
  • They are advantageous in constructing relational databases.

Notations and Symbols of an ER Diagram

"Notations and Symbols of an ER Diagram"

The three basic symbols used to draw an ER Diagram are rectangles, ovals, and diamonds. These shapes each represent the main three elements of the ER model—entities, attributes, and relationships. There are variations to these symbols that represent the other elements of the ER diagram. Together, they can be used to characterize the database’s architecture.

Here are the Symbols Utilized in the ER Diagram

  • Rectangles: Represents the database’s entity set.
  • Ellipses (or) Ovals: Represents the attributes of the entities.
  • Diamonds: This shape represents the type of relationships the entities share.
  • Lines: Serve as links between entities and attributes (or) entities and their relationships.
  • Double Rectangles: Highlights weak entities.
  • Double Ellipses: This shape represents multi-valued attributes
  • Double Diamonds: Highlights weak relationships.
  • Underlined Attribute Name: Represents a primary key.
  • Dashed Underline: Represents weak entity’s key attribute (partial key).

A Detailed Look into ER Diagrams

"A detailed look into ER Diagram"

But what do the three fundamental elements of the diagram really mean? To expand further:

Entities are represented by single rectangles. An entity is a real-world object that has some information that describes it. A group of entities of the same type is called an entity set. This is the information that is eventually stored in the database. The other type of entity, portrayed as double rectangles, is the weak entity. This entity cannot be identified using its attributes and requires a relationship with another entity to define it. Therefore, it is only strengthened its discriminator (partial key) and the primary key of the strong entity.

An example of a strong entity: A student is a strong entity as they can be identified by the primary key Roll Number.

An example of a weak entity: A bank account cannot exist if there is no bank. Therefore, a bank account is a weak entity.

Relationships are the diamond shapes in the ER diagram. These emphasize the communication between one (self-loop) or more entities in the database. An example would be the flow of information between a principal and a teacher in a school.

Cardinality: It describes the numerical value of the relationship between two entities or entity sets. Developers prefer to use different notations to define cardinality. Here is an example of one such notation:

The categories of entity relationships are:

  1. One to One
  2. One to Many
  3. Many to One
  4. Many to Many

One to One Relationship

This is a relationship between one instance of an entity set to another. For example, a student owns a notebook, and the notebook belongs to the student. Here, the student and the notebook belong to separate entity sets.

One to Many Relationship

An instance of an entity set is linked to more than one instance of another entity set. For instance, a student can own many notebooks, but a notebook cannot be owned by many students.

Many to One Relationship

This is when many instances of an entity set can be associated with one of another entity set. For example, many students can be part of just one school, but many schools cannot enroll the same student.

Many to Many Relationship

This happens when many instances of an entity set are linked to many instances of a second entity set. For example, many students can work on many assignments, and many assignments can be given to many students.


Attributes are represented by ovals. It assigns a set of properties to an entity. For example, a student’s name could be an attribute.

Here are the various types of attributes in the ER model:

  1. Key attribute
  2. Composite attribute
  3. Multivalued attribute
  4. Derived attribute

Key attribute

A key attribute acts as a unique identifier for an entity. For instance, a student’s roll number is unrepeatable and unique. Just like any other attribute, they are represented by an oval. However, the label is underlined. 

Composite attribute

This attribute can be broken down into many parts. For example, an address has smaller parts and can be written in terms of the house number, street name, city, state, and so on. Therefore, it makes a composite attribute.

Multivalued attribute

Any attribute that can have multiple values is called a multivalued attribute. This has a different notation to other attributes such that it is drawn using double ellipses. An example of such an attribute is a student’s phone number since one can handle many (such as home and personal phone numbers).

Derived attribute

These types of attributes can extract their value from another attribute. Its symbol is a dashed oval. An instance of this is when a student’s age can be found if his date of birth is known.

Finally, Connecting lines join entities, attributes, and relationships together to form a consistent diagram.

Steps to Perfect ER Diagrams

Here are a few of the best ways to improve the ER diagram.

  • Label all the entities and relationships correctly.
  • Remove redundant entities. No entity must appear twice in the diagram.
  • Colors can be used to differentiate different levels of the ER diagram.
  • Do not connect relationships. They must always be linked to other entities.

There are many possible executions of an ER diagram. Choose the one that works for the data you’re dealing with best.

Context and Applications   

This topic is significant in the professional exams for both undergraduate and graduate courses, especially for 

  • Bachelor of Technology in computer science and engineering
  • Master of Technology in computer science

Want more help with your computer science homework?

We've got you covered with step-by-step solutions to millions of textbook problems, subject matter experts on standby 24/7 when you're stumped, and more.
Check out a sample computer science Q&A solution here!

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
EngineeringComputer Science

Database

Designing Database

Concepts in designing Database

Entity Relationship Diagram Homework Questions from Fellow Students

Browse our recently answered Entity Relationship Diagram homework questions.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
EngineeringComputer Science

Database

Designing Database

Concepts in designing Database