Glossary/Data Storage and Processing/
Entity Relationship Diagram (ERD)

What is an Entity Relationship Diagram?

This is some text inside of a div block.

What is an Entity Relationship Diagram?

An entity relationship diagram (ERD) is a visual form of relational databases. ERDs can be used to design a new database, or to visualize and understand an existing one. They're also often referred to as entity relationship models, or entity relationship graphs.

Understanding ERD's begin with understanding what an entity is, and what an entity set is. An entity in this context is an object, a component of data. An entity set is a collection of similar entities. An ERD demonstrates the relationships of entity sets stored in a database.  These entities can have attributes that define its properties. By defining the entities, their attributes, and showing the relationships between them, an ERD illustrates the logical structure of databases.

There are three main components in ERDs: entities, attributes, and relationships.

Entities correspond to tables in relational databases (rows). Attributes are the properties you want to capture about that entity (columns). And finally, relationships are how the entities interact.

Explaining Entity Relationship Diagrams (ERD)

An ERD is a data model that graphically represents an organization's entities and the relationships between those entities. Entities are the values hat represent things your organization works with, such as customers, products or vendors. Relationships are descriptors that define how two entities interact, such as purchases or sales. An entity relationship diagram shows these entities and their relationships in a graphical manner.

The entity relationship diagram (ERD) is one of the most important tools a systems analyst has in his or her toolkit. It provides a graphical view of an organization's functional requirements and is used to design relational databases, but it can also be used as part of the fundamental modelling process for many other types of systems.

The entity relationship diagram is usually drawn as a series of rectangles with connecting lines, although many different shapes and notations are also available for representing entities, relationships and additional information about them.

The purpose of an ERD is not only to document the current state of an organization's enterprise data architecture but also to help guide its future development by determining what needs to change. ERDs are commonly used for designing relational databases in the field of software engineering. ERDs can be used by database designers as a blueprint for implementing data in specific software applications.

Components of an ERD

The main components of ER diagrams are entities (which will become your tables) and the relationships between those entities.

Entities are the "things" for which we want to store information. They're typically nouns like Customer, Product, Order or Event. An entity is an object or concept about which you want to store information. For example, in a school database, students, classes, and teachers would all be considered entities.

Entity categories. These are part of attributes of the entities themselves, but provide a more structured description and "tag" of what an entity consists of.

Attributes are identifiers of the entities. These are what help distinguish different pieces of data from each other. For example, a customer (the entity) is a user who has made a purchase (attribute).

Relationships describe how entities interact with each other. For example, one customer can have many sales orders and each sales order belongs to only one customer. The relationship between customer and sales order is 1:M (one-to-many).

How to draw an ER Diagram

  1. Define your goals and scope. This will be your guideline when determining what to include in your diagram, and should cover what you're mapping and why.
  2. Inventory of entities. Understanding what entities you're trying to map and giving them appropriate labels.
  3. Understanding relationships. This is when you can start to visualize how your entities interact with each other.
  4. Provide context with attributes. Assign your entities and relationships with attributes that provide more context on the interactions with each other.

Example of an Entity Relationship Diagram

Courtesy of lucidchart.com

Related terms

From the blog

See all