Database Star

A Guide to the Entity Relationship Diagram (ERD)

Learn all about Entity Relationship Diagrams (ERDs), what they are used for, how to understand them, how to create them, and more in this guide.

Table of Contents

What is an Entity Relationship Diagram (ERD)?

An Entity Relationship Diagram (ERD) is a type of diagram that lets you see how different entities (e.g. people, customers, or other objects) relate to each other in an application or a database.

They are created when a new system is being designed so that the development team can understand how to structure the database. They can also be created on an existing system to help the team understand how the system works and to find and resolve any issues.

Entity Relationship Diagrams use a specific set of symbols, such as shapes and arrows, to depict the system and database.

Here’s an example of an ERD:

Logical ERD

Components of an ERD

An Entity Relationship Diagram is made up of many different components:

Relationship

An entity is a thing that can have data stored about it. It can be a physical object (e.g. car, person), a concept (e.g. address) or an event (e.g. student enrolment in a course). They represent nouns.

They are usually represented as rectangles on an ERD with the entity name inside the rectangle.

An entity can also be a strong entity or a weak entity. What’s the difference?

A strong entity has an identifier (a primary key) and does not depend on any other entities for it to exist. For example, a student may be a strong entity, as it can have a primary key and does not depend on any other entities for it to exist.

A weak entity is one that depends on a strong entity for existence. This means it has a foreign key to another entity. For example, an enrolment of a student may be a weak entity, as an enrolment cannot exist without a student.

A relationship in an ERD defines how two entities are related to each other. They can be derived from verbs when speaking about a database or a set of entities.

Relationships in ERDs are represented as lines between two entities, and often have a label on the line to further describe the relationship (such as “enrols”, “registers”, “completes”).

There are several types of relationships that are represented on an ERD:

  • One to one: One record of an entity is directly related to another record of an entity
  • One to many: One record of an entity is related to one or more records of another entity.
  • Many to many: Many records of one entity can be related to many records of another entity.

An attribute is a property of an entity or something that can be used to describe an entity. They are often represented as ovals, or as entries inside an entity.

There are several different types of attributes represented on an ERD:

  • Simple: an attribute that cannot be split into other attributes, such as a first name.
  • Composite: an attribute that can be split into other attributes, such as name being split into first, middle, and last name.
  • Derived: an attribute that is calculated or determined from another attribute, such as the age of record being calculated from the created date.

An attribute can also be single-value or multi-value:

  • Single-value: an attribute that is only captured once for
  • Multi-Value: an attribute that can be captured more than once for an entity, such as multiple phone numbers.

What is Cardinality?

Cardinality represents the number of instances of an entity that exist in a relationship between two entities. This is often expressed as a number but could also be a symbol, depending on the style of diagram used. Common cardinality values are zero, one, or many.

We’ll see some examples of cardinality later in this guide.

Natural Language

When we are creating an ERD we often have an idea of what we want to capture. This can usually be expressed in words, or using “natural language”.

Some examples are:

  • “Record students, courses they enrol in, and teachers who teach the course”
  • “Capture the customer orders, customer details, and where the orders are being sent”
  • “Capture patient data and the operations they had”

These sentences include a few different types of words, which can be used as a starting point for an ERD. They are represented in a few different ways:

  • Noun: a “thing”, such as a student or customer. Represented as an entity.
  • Verb: an action, such as enrol or send. Represented as a relationship between two entities.
  • Adjective: a describing word, such as residential or advanced. Represented as an attribute on an entity.

This can help you translate a description of what you need to diagram into an actual diagram.

Symbols and notations

When creating an ERD, it can be simple to create boxes and lines between them. But, like many things in software development, there are a few different methods and standards that are available. For ERDs, there are several notation standards, which define the symbols used.

Here’s an example of the symbols used with the Chen notation style.

Chen Notation

Here’s an example ERD using Chen notation:

Chen Notation Example ERD

Crow’s Foot

Here’s an example of the symbols used with the Crow’s foot notation style. This is the style you’ll see the most on Database Star as it’s the one I’m most familiar with. It’s called “crow’s foot’ as the symbol for a many relationship looks like the foot of a crow with its three prongs.

Crows Foot

Here’s an example ERD using Crow’s Foot notation:

Crow's Foot Examples

Here’s an example of the symbols used with the Bachman notation style.

Bachman ERD

Here’s an example ERD using Bachman notation:

Bachman Example ERD

Here’s an example of the symbols used with the IDEF1X notation style.

IDE1FX Notation

Here’s an example ERD using IDEF1X notation:

IDE1FX Example ERD

Here’s an example of the symbols used with the Barker notation style.

Barker ERD Notation

Conceptual, logical, physical

An Entity Relationship Diagram can be drawn at three different levels: conceptual, logical, or physical.

Each of these levels has a different level of detail and are used for a different purpose.

Let’s see some examples.

Conceptual Data Model

The conceptual data model shows the business objects that exist in the system and how they relate to each other.

It defines the entities that exist, which are not necessarily tables. Thinking of tables is too detailed for this type of data model.

An example of a conceptual data model is shown here. It shows students, courses, and how they relate.

Conceptual ERD

Logical Data Model

A logical model is a more detailed version of a conceptual data model. Attributes are added to each entity, and further entities can be added that represent areas to capture data in the system.

Here’s an example of the student and course data model created as a logical data model.

Physical Data Model

The physical data model is the most detailed data model in this process. It defines a set of tables and columns and how they relate to each other. It includes primary and foreign keys, as well as the data types for each column.

These diagrams can be created manually in a data modelling tool. They are also often generated by an IDE from an existing database.

Here’s an example of the student and course physical data model.

Physical ERD

This table outlines the differences between a conceptual, logical, and physical model:

How to Create an Entity Relationship Diagram

So how do you create a data model or an Entity Relationship Diagram?

I’ve detailed this in my Relational Database Design course, and I’ve also explained it in my guide to designing a database .

The process to create an ERD is:

  • Write a sentence or two about what you are storing data about
  • List what you’re storing data about – the nouns/objects
  • List the information you want to store for each object
  • Describe the relationships between each object
  • Draw the diagram

The steps listed here are brief but the process can take some time, depending on how familiar you are with the system and how experienced you are with creating Entity Relationship Diagrams.

Tools to Use

What tool should you use to create a data model or an Entity Relationship Diagram?

There are a lot of applications available to help you create one. I’ve written a post that lists them all with a comparison of major features and price, which you can find here: 79 Data Modeling Tools Compared .

Personally, I use LucidChart as it’s simple to use and web-based. But in the past, I’ve used Visio and even the data modelling capabilities inside an IDE.

That page above includes a range of tools and some recommendations if you’re not sure what to use.

You can also start with a pen and paper to get an understanding of how a diagram can be created. I often start by drawing one in my notebook. It gets messy eventually, but I transfer it to an electronic copy anyway.

Tips for Creating an Entity Relationship Diagram

Here are some tips for creating an Entity Relationship Diagram:

  • Determine the right level of detail based on the purpose of the diagram. Development teams often find the logical model the most useful, but others might find the conceptual model more valuable.
  • Review the entities and attributes to see if they include everything you want to store in the system.
  • Name all entities and attributes.
  • If you have a large diagram, consider using colours to highlight different sections, or breaking it up into smaller diagrams.
  • Be consistent with your naming and the symbols you use.

An Entity Relationship Diagram is a great tool to help you define, understand, and communicate the requirements of a system. It can be modelled at a high level (conceptual data model), a detailed level (physical data model) or a level in between (logical data model).

There is a range of modelling notations or types of symbols which define how entities, attributes, and relationships are captured.

If you want to get started with creating an ERD for your system, consider drawing one on paper, or use one of the many tools available.

15 thoughts on “A Guide to the Entity Relationship Diagram (ERD)”

designing a relational database assignment quizlet

Hi, may I congratulate you on a job very well done. Your comparative diagram notation are clear, you don’t use too much jargon. Kudo

designing a relational database assignment quizlet

Very clearly explained, Thank You

designing a relational database assignment quizlet

excellent job with the explanation. Thanks, it really helps👍👍

designing a relational database assignment quizlet

Great insight will be coming can you help me solve my question from my class? To identify a problem of an organization and develop ER-Diagram and a database management system to solve it.

designing a relational database assignment quizlet

You need to give lecture to our doctor at the university. I am glad that English is the science language not German or any other language,

designing a relational database assignment quizlet

Very well explained, as I was struggling of what is a ERD, how do I design it. But now you have explained clearly as I understand very much. I like to say thank you for your hard effort.

designing a relational database assignment quizlet

Nice post!I will read more post in this site! Thank you!

designing a relational database assignment quizlet

Great article, really clear and well-written -thank you!

Just one minor point; I think the second Bachman diagram should actually be a Barker example?

designing a relational database assignment quizlet

Dear mister genius, thank you.

designing a relational database assignment quizlet

The notes are very clear and understandable.

designing a relational database assignment quizlet

i support you dear.

designing a relational database assignment quizlet

Thats the best description of data modelling I’ve seen in my quest to understand the concept

designing a relational database assignment quizlet

Excellent Explain

designing a relational database assignment quizlet

help me a lots, tyvm

Leave a Comment Cancel Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Quiz 6: Database Design: Relationships

  • Multiple Choice
  • Short Answer
  • Select Tags
  • Multiple Choice (0)
  • Short Answer (0)
  • True False (0)
  • Matching (0)

surly

  • Perks Center
  • Homeschooling
  • Campus Reps
  • Influencers
  • Privacy Policy
  • Terms Of Service
  • Community Guidelines

qr-code

  • Referral Program
  • Chrome Extension
  • Get it on the App Store
  • Get it on Google Play

surly

IMAGES

  1. Chapter 5

    designing a relational database assignment quizlet

  2. Relational Database Design Flashcards

    designing a relational database assignment quizlet

  3. Chapter 3: The Relational Database Model Flashcards

    designing a relational database assignment quizlet

  4. Chapter 3

    designing a relational database assignment quizlet

  5. DataBase Diagram

    designing a relational database assignment quizlet

  6. Designing a Relational Database and Creating an Entity Relationship

    designing a relational database assignment quizlet

VIDEO

  1. DATABASE INSERT , EDIT AND DELETE

  2. Database assignment MySQL Workbench query ISMT

  3. Design and Implementation of Database

  4. Design a non-relational data storage solution with Elias and Vivian

  5. CPD

  6. Question Set 18

COMMENTS

  1. Designing a Relational Database Flashcards

    What is the purpose of the Lookup Wizard? B) to reference data from another table. Use the drop-down menus to complete the steps to open the Lookup Wizard. 1. Open the table in Design view. 2. Click in the ________ column of the desired field. 3. Click the ________, and then click Lookup Wizard.

  2. Designing a Relational Database Flashcards

    Order the steps needed to design a relational database. 1. List fields needed to gain information. 2. Break down the data into smaller parts. 3. Identify the fields holding stored data. 4. Distribute the fields into tables by subject.

  3. Relational database design Flashcards

    Study with Quizlet and memorize flashcards containing terms like Data design is the process of, A database consists of, Every table should have a primary key because and more. ... Relational database design. Flashcards. Learn. Test. Match. Flashcards. Learn. Test. Match. Created by.

  4. A Guide to the Entity Relationship Diagram (ERD)

    A relationship in an ERD defines how two entities are related to each other. They can be derived from verbs when speaking about a database or a set of entities. Relationships in ERDs are represented as lines between two entities, and often have a label on the line to further describe the relationship (such as "enrols", "registers ...

  5. Quiz 6: Database Design: Relationships

    Question 2. When referential integrity is enforced on a one-to-many relationship in Access, you may not delete a record in the "one" table that has related records in the "many" table. ( True/False) 4.8/5 (9) Question 3. Building the entities, attributes, constraints, and relationships in a particular RDBMS is called the _____. ( Multiple Choice)

  6. Designing Relational Databases: Designing a Database ...

    Implementing a One-to-One Database Relationship. A one-to-one relationship can be enforced in PostgreSQL by first creating a many-to-one relationship via a foreign key, then implementing a UNIQUE constraint on the foreign key. For example, the code here implements a one-to-one relationship between tables named employees and contact_info.

  7. Database Management Essentials

    In this course, you will create relational databases, write SQL statements to extract information to satisfy business reporting requests, create entity relationship diagrams (ERDs) to design databases, and analyze table designs for excessive redundancy. ... Extra problems using the Order Entry Database • 120 minutes; Assignment for Module 12 ...

  8. Cengage Learning Database Ch3

    ##### Relational database integrity rules are very important to good database design. RDBMSs ##### enforce integrity rules automatically, but it is much safer to make sure your application ##### design conforms to the entity and referential integrity rules mentioned in this chapter. ##### ose rules are summarized in Table 3. TABLE 3.

  9. Database Design and Basic SQL in PostgreSQL

    Students will do hands-on assignments creating tables, inserting data, designing data models, creating relational structures and inserting and querying relational data in tables. ... This week focuses on relational database design and one-to-many data models. You'll also learn the functions of primary, logical, and foreign keys within a ...

  10. Solved To begin designing a relational database, you must

    To begin designing a relational database, you must define the by defining each table and the fields in it. a. logical structure. b. primary key. c. foreign key. d. physical structure. Here's the best way to solve it. Powered by Chegg AI. View the full answer. Previous question Next question.

  11. designing a relational database assignment quizlet

    The primary feature of a relational database is its primary key, which is a unique identifier assigned to every record in a table. An example of a good primary key is a registration number.... A good database design is important in ensuring consistent data, elimination of data redundancy, efficient execution of queries and high performance application.

  12. OverviewThis assignment is designed to help you

    Question: OverviewThis assignment is designed to help you understand how to model a relational database.Assignment1. Using the data in the Cake Order Database, decide what tables of data could be created, and what fields would be included in the tables.2. Identify what field would serve as the primary key for the tables.3.

  13. Solved The assignment's goal is to create a relational

    The assignment's goal is to create a relational schema for a database that might be used in a domain of your choice. You may choose any science, business, or life area that interests you and design a database for it. You do not need to submit SQL code for this assignment.. The two prohibited topics are university and streaming services.

  14. Learning Journal Assignment Unit 3- Relational Database Design

    Learning Journal Assignment Unit 3: Relational Database Design Department of Computer Science University of the People CS 1104-01 Computer Systems - AY2024-T4 Joshua Rippe (Instructor) May 1, 2024 Given the following unnormalized relation representing a library database: Books (Book_ID, Title, Author, Genre, Publisher, Publication_Year, ISBN, Price) a) Define normalization in the context of ...

  15. MLearning aim B and CUnit 2 Creating System to Menage Information

    Each animal is fed a specific diet a set number of times a day. Task 1 The owner of the wildlife park has accept your report and would now like you to proceed in creating the database. Create a data dictionary and entity relationship diagram (ERD) for the database given in the set assignment information. The database structure must: • accept the data provided • avoid unnecessary ...