Entity Relationship Diagram: A Practical Guide

Peter Chen proposed the ERD in 1976 as a conceptual modelling tool which represents real world data in the form of entities and relationships. Its primary application is in the design of relational databases; this is why it is also referred to as a Database Model.

So, what exactly are entities and why would you want to draw one?

Entities are things we need to store data about. Think of the user/business environment as a collection of “things” we need to know about. ERDs show entities, their attributes (qualities that describe entities) and the relationships among these entities.

Though analysts mostly employ the use of ERDs for communicating the design of databases to developers, they are also an interesting way of illustrating the constraints that guide the use of a system to users through cardinality. For example, an ERD can show how many orders a customer can have or whether one order can only be linked to only one or multiple customers. Because it shows the relationship between the entities in the system, it may also be used for explaining constraints or business rules. 

Data entities are represented by rectangles; relationships are represented by diamonds while attributes are represented by ovals (See example below).

ERDs are particularly useful where the BA wants to:

  • Model the data in an organization in terms of the different types/categories of data and their relationships to each other
  • Share information on the types of data the organization stores
  • Provide a model for database design
  • Reveal ambiguities and other data items that the system needs to store

In order to draw an ERD effectively, the BA must understand the domain and how things work – especially the business rules. 

Take a look at this scenario:

Customers visit the Centage website to purchase gardening items. Customers may or may not place orders at any one time. Each order is assigned a unique order code and an order may have multiple items. One order can have multiple transactions since customers may add items, change the quantity of items or even return items after purchase, if they so desire. Relevant customer information includes name, address and telephone number.

The steps to creating an ERD are as follows:

  • Identify the entities - Entities are easy to recognize as they are represented by nouns.
  • Identify attributes - these are qualities/values associated with entities
  • Identify the relationships between the entities  - relationships are identified by verbs
  • Link entities to attributes and link entities together via their relationships

The ERD Diagram for the above scenario can be represented as follows:

ERD Diagram

Cardinality is illustrated below: 

ERD Showing cardinality notations

ERDs can be useful in understanding the data elements involved in your project and how they work together. It requires considerable practice to become comfortable with applying it but once you do, the sky is the limit.

To learn more about ERDs, explore Laura Brandenburg's Data Modelling For Business Analysts course.

Useful Links

A Beginner’s tutorial on how to draw ERD
Systems Analysis & Design in a Changing World contains an explicit illustration on how to create ERDs. The chapter is available for free here.
- A great article for understanding data models