Ultimate Guide to ER Diagrams ( Entity Relationship Diagrams )

So you want to learn ER diagrams? This ER diagrams tutorial will cover their usage, history, symbols, notations and how to use our ER diagram software to draw them. We’ve also added some templates for you to quickly get started.

What is an ER diagram?

An Entity Relationship Diagram (ERD) is a visual representation of different entities within a system and how they relate to each other. For example, the elements writer, novel, and a consumer may be described using ER diagrams the following way:

ER Diagram Example

ER diagram with basic objects

They are also known as ERD’s or ER models. Click on the below links if you want to learn something specific about ER diagrams.

History of ER Diagrams

Although data modeling has become a necessity around 1970’s there was no standard way to model databases or business processes. Although many solutions were proposed and discussed none were widely adopted.

Peter Chen is credited with introducing the widely adopted ER model in his paper “The Entity Relationship Model-Toward a Unified View of Data“. The focus was on entities and relationships and he introduced a diagramming representation for database design as well.

His model was inspired by the data structure diagrams introduced by Charles Bachman. One of the early forms of ER diagrams, Bachman diagrams are named after him.

For a detailed history of ER diagrams and the evaluation of data modeling, refer this article.

ER Diagrams Usage

What are the uses of ER diagrams? Where are they used? Although they can be used to model almost any system they are primarily used in the following areas.

ER Models in Database Design

They are widely used to design relational databases. The entities in the ER schema become tables, attributes and converted the database schema. Since they can be used to visualize database tables and their relationships it’s commonly used for database troubleshooting as well.

ER diagrams in software engineering

Entity relationship diagrams are used in software engineering during the planning stages of the software project. They help to identify different system elements and their relationships with each other. It is often used as the basis for data flow diagrams or DFD’s as they are commonly known.

For example, an inventory software used in a retail shop will have a database that monitors elements such as purchases, item, item type, item source and item price. Rendering this information through an ER diagram would be something like this:

ER diagram example with entity having attributes

ER diagram example with entity having attributes

In the diagram, the information inside the oval shapes are attributes of a particular entity.

ER Diagram Symbols and Notations

ER diagram symbols discussed in this ER diagrams tutorial

Elements in ER diagrams

There are three basic elements in an ER Diagram: entity, attribute, relationship. There are more elements which are based on the main elements. They are weak entity, multi valued attribute, derived attribute, weak relationship, and recursive relationship. Cardinality and ordinality are two other notations used in ER diagrams to further define relationships.

Entity

An entity can be a person, place, event, or object that is relevant to a given system. For example, a school system may include students, teachers, major courses, subjects, fees, and other items. Entities are represented in ER diagrams by a rectangle and named using singular nouns.

Weak Entity

A weak entity is an entity that depends on the existence of another entity. In more technical terms it can be defined as an entity that cannot be identified by its own attributes. It uses a foreign key combined with its attributed to form the primary key. An entity like order item is a good example for this. The order item will be meaningless without an order so it depends on the existence of the order.

Weak Entity in Entity Relationship Diagrams

Weak Entity Example in ER diagrams

Attribute

An attribute is a property, trait, or characteristic of an entity, relationship, or another attribute. For example, the attribute Inventory Item Name is an attribute of the entity Inventory Item. An entity can have as many attributes as necessary. Meanwhile, attributes can also have their own specific attributes. For example, the attribute “customer address” can have the attributes number, street, city, and state. These are called composite attributes. Note that some top level ER diagrams do not show attributes for the sake of simplicity. In those that do, however, attributes are represented by oval shapes.

Attributes in ER Diagrams

Attributes in ER diagrams, Note that an attribute can have its own attributes ( composite attribute )

Multivalued Attribute

If an attribute can have more than one value it is called a multi valued attribute. It is important to note that this is different to an attribute having its own attributes. For example, a teacher entity can have multiple subject values.

Multivalued attribute in entity relationship diagrams

Example of a multivalued attribute

Derived Attribute

An attribute based on another attribute. This is found rarely in ER diagrams. For example, for a circle, the area can be derived from the radius.

Derived Attribute in ER diagrams

Derived Attribute in ER diagrams

Relationship

A relationship describes how entities interact. For example, the entity “Carpenter” may be related to the entity “table” by the relationship “builds” or “makes”. Relationships are represented by diamond shapes and are labeled using verbs.

Relationships in ER diagrams

Using Relationships in Entity Relationship Diagrams

Recursive Relationship

If the same entity participates more than once in a relationship it is known as a recursive relationship. In the below example an employee can be a supervisor and be supervised, so there is a recursive relationship.

Recursive Relationship in ER Diagrams

Example of a recursive relationship in ER diagrams

Cardinality and Ordinality

These two further defines relationships between entities by placing the relationship in the context of numbers. In an email system, for example, one account can have multiple contacts. The relationship, in this case, follows a “one to many” model. There are a number of notations used to present cardinality in ER diagrams. Chen, UML, Crow’s foot, Bachman are some of the popular notations. Creately supports Chen, UML and Crow’s foot notations.The following example uses UML to show cardinality.

Cardinality in ER diagrams

Cardinality in ER diagrams using UML notation

How to Draw ER Diagrams

Below points show how to go about creating an ER diagram.

  1. Identify all the entities in the system. An entity should appear only once in a particular diagram. Create rectangles for all entities and name them properly.
  2. Identify relationships between entities. Connect them using a line and add a diamond in the middle describing the relationship.
  3. Add attributes for entities. Give meaningful attribute names so they can be understood easily.

Sounds simple right? In a complex system, it can be a nightmare to identify the relationships. This is something you’ll perfect only with practice.

ER Diagram Best Practices

  1. Provide a precise and appropriate name for each entity, attribute, and relationship in the diagram. Terms that are simple and familiar always beats vague, technical-sounding words. In naming entities, remember to use singular nouns. However, adjectives may be used to distinguish entities belonging to the same class (part-time employee and full-time employee, for example). Meanwhile attribute names must be meaningful, unique, system-independent, and easily understandable.
  2. Remove vague, redundant or unnecessary relationships between entities.
  3. Never connect a relationship to another relationship.
  4. Make effective use of colors. You can use colors to classify similar entities or to highlight key areas in your diagrams.

Drawing ER Diagrams Using Creately

You can draw entity relationship diagrams manually, especially when you are just informally showing simple systems to your peers. However, for more complex systems and for external audiences, you need diagramming software such as Creately’s to craft visually engaging and precise ER diagrams. The ER diagram software offered by Creately as an online service is pretty easy to use and is a lot more affordable than purchasing licensed software. It is also perfectly suited for development teams because of its strong support for collaboration.

ER Diagram Templates

Below are some ER diagram templates so you can get started quickly. Clicking on the image and in the new page that opens click the “Use as Template” button. For more templates check our ER diagram templates section.

ER Diagram Template

ER Diagram Template of exam database ( Click on the image to use as template )

A basic ER diagram template for a quick start

Entity Relationship Diagram Template

Basic ER Diagram template ( Click to use as template )

Benefits of ER diagrams

ER diagrams constitute a very useful framework for creating and manipulating databases. First, ER diagrams are easy to understand and do not require a person to undergo extensive training to be able to work with it efficiently and accurately. This means that designers can use ER diagrams to easily communicate with developers, customers, and end users, regardless of their IT proficiency. Second, ER diagrams are readily translatable into relational tables which can be used to quickly build databases. In addition, ER diagrams can directly be used by database developers as the blueprint for implementing data in specific software applications. Lastly, ER diagrams may be applied in other contexts such as describing the different relationships and operations within an organization.

Feedback on ER Diagrams Tutorial

I’ve done my best to cover all you need to know about ER diagrams. If you think I’ve missed some part make sure to mention that in the comments sections. It’s a good place to ask questions too. If a question is asked frequently I will add it to the frequently asked questions section.

References

1. Entity-relationship model as published on Wikipedia.
2. Entity Relationship Diagram by Mike Chapple as published on the About.com website
3. Entity-Relationship Modelling by Craig Borysowich as published on the Toolbox.com website

Author

Nishadha

Software engineer turned tech evangelist. I handle marketing stuff here at Creately including writing blog posts and handling social media accounts. In my spare time I love to read and travel. Check out my personal blog Rumbling Lankan where I write about online marketing stuff.

Comments

  1. Priscilla

    this explanation is very good and fairly easy to understand. I might have to review Cardinality and Ordinality once or twice more but the rest was very concise and clear. Thank you.

  2. Lakna Madurani

    it is very important to me…….tnx

  3. Amith Nischal

    Hi Nishadha,

    Explanation is so good and easily understandable. I have some doubts. I’ve taken a DBMS-1 course in my Master’s and my professor taught me ERD differently. For relationships he used triangle, not a diamond. In cardinality he didn’t use UML, Chen or Crow’s foot notations. He used some thing different, like Thick lines, thin lines, one-sided arrows etc. Could you help me to figure out what notations are those and also I am curious enough to know which notation is used widely. Please help me with this.

    Thanks.

  4. Yusuph Khamis

    Nice explanation….simple and understandable
    Yusuph Khamis Pius from TANZANIA

  5. Leonard Wartovo

    Thank you. This is understandable!

  6. Amad

    Really very nice & helpful article. this is really nice diagrams tutorial you did good job Thank you

  7. Ali Ahmadi

    Very very Nice tutorial Thank you Very Much.
    I’d a Question: Which kind of Attribute is the Date?

  8. sudhansu

    *********very nice *********thank you***********

  9. Priyanka

    It’s Really Useful thank you..

  10. Angela Vaughn

    This was a great explanation of ERD. I’m currently taking a class a database concepts class at University of Phoenix. The details describe here was clear, and will help me with my assignments. Thank you! 🙂

  11. Asvitha

    Got satisfied with what is needed.Thank you.

  12. Deepika

    very nice!!!! esay to understand.Really nice article.Thanks!!!! keep doing this it will be very helpfull…..

  13. Faizal

    Thanks sir for your share. alhamdulillah ur explaination just simple n great. A week on understanding the lecturer but still blur,juz read your in 5 min the thing be cleared

  14. sushma

    A unique blog as your name … Very simple and easy.. relevant examples !! keep up the good work …..

  15. Dzinaishe

    Best explanation of E R Diagrams i have met so far. Good job Nishada

  16. Sheela

    Thanks for the post. Very good explanation. Good color highlights to explain the diagrams.

  17. Samarjeet

    Great learning. Keep up the good work

  18. vlc

    Never seen this notation before… everything looks like 1:1 … mixes attribute relations, entity relations, and verbs. Anyway.. at least it is a notation.

  19. Umair

    exellent explanation for ER diagram……….

  20. khilji

    if this is ERD then what will be DFD
    just check r u talking about ERD or DFD

  21. Dimitar

    A gud tut…..big up……From Kenya

  22. Mustafa

    Good definition,that a ER diagram may has.

  23. It is really ultimate explanation. Thanks to creately.com team.

  24. Gagan

    Thank you sooo much for this blog. It really helps me a lot to create ER Diagram for my project. Well Explained 🙂

  25. Amritpal

    Awesome guide for ERD, i understand a lot of about creating a good erds in half hour.

    appreciated from heart.

  26. shayankhan

    here we gain lots of info thank dude by making this such type of articles ……really appreciated

  27. zulekha khan

    Well explained…. So help full….

  28. musa

    thanks a lot Nishada, I benefited a lot from your staff. May God reachly bless you. Amen

  29. Haritha

    Many readers will be benefiting from your blog. Thanks for listing the ERP Diagrams which is necessary software for businesses. Thanks for sharing such a useful diagrams list..

  30. tkmd

    i am a teacher trainee of ict thank you v,much

  31. Abraham Dinakaran

    Good . I need learning materials on UML stuffs for handling and guiding projects for students

  32. usha

    A Supplier located in only one city supplies various parts for the project to different companies located in various cities. Draw the “E-R” for the supplier and parts database.

    can i get the ER diagram for this

  33. sejal khunt

    hi i am student of b.c.a 6th sem. ,i can’t draw ER diagram for my project website.in my project i have 4 database tables so, how i creat ER diagram

  34. pakistani

    bhenchod indian kutte da puttar

  35. leila

    thank you…verry well…leila from iran

  36. RAM GITE

    VERY NICE THIS EXPLAINATION , I LIKE ITS SIMPLE SOLUTION THANK U …………..

  37. Nana parkhe

    The author explained the ER model in a simple & understandable language.

  38. prakash

    Thank you so much sir.. Its very usefull for me…

  39. Isuru Prasad

    Dear sir thank you for this. today is my exam. i did not knw anything about ER diagram. i guess i can write nicely for exam to. thank u again

  40. jessy

    thank you so much for the information…

  41. Swapnil

    Very descriptive and useful article. Helped me for my SE project.

  42. Neha

    Can someone please explain all the notations used in er diagram?

  43. anony

    really helpfull thanks! 🙂

  44. Jamal

    What about the tables in a database which are not interrelated? How to show ER diagram of a complete database with few related tables and few other non-related tables. It’s not necessary that each and every table in a database in interrelated.

  45. Haroon

    It is good to understand!

  46. I am impressed how easily he described erd and relatons easily..god bless you

  47. Hosein

    Hi
    I want draw a ERD of website news?

  48. raphael lenarisiolo

    Good explanation for ER-Diagrams,it really helped me in my examination.

  49. ritu jain

    we cannot get a proper charts so elaborate these site more

  50. shereenzaman

    Good example of ERD

  51. Jaison

    good .u can also draw the attributes from the entity tablle as a little ballon , on top of the ballon u can write the entity names.

  52. DANCAN

    very very nice article. really helped me out.. . .

  53. saroj dongol

    Great Tutorial… Love it

  54. Virtue

    the most good and easy to understand explanation,thank you….

  55. good explaination and its very useful
    thanx

  56. Frances

    Thank you so much. Your explanation made my module easy for me 🙂

  57. ANAND

    its very good n very easy to understand

  58. asghar khan

    thanxs…very simple and easy to understand….

  59. Prashant

    You can add relationship sets between two entities after you are done making entity sets right ?

  60. Sijovw

    Thanks dear. but i also need to know about the ‘arrow headed line’ and ‘double lines’ . Can we use arrow heads in ER diagrams? If it is, then how?

  61. Chow

    Very clearly explained 🙂

  62. pavi

    this is very useful for the students 🙂

  63. Nupur

    CooooOl.. TotAlLy RoCKs’..

  64. suthakaran gobal

    Best explanation for beginners !

  65. Zaharaddeen Elhassan

    thanks , excellent explanation, simple English and easy to understand

  66. radhika

    good description for ER diagrams…

  67. getinet

    add more related examle but the other thing is good i think

  68. Rohan Nagpal

    I required this for my dbms exam in the morning. This article is so well explained enough for a one legged man to run a marathon. Thank you dear editor.

  69. Sandeep Patel

    hello
    what we can show relationship of PK and FK using ER Diagram..???

  70. Rajiv

    Thanks for such a nice explanation\

  71. thyagaraj

    Im new to dbms….i got help from ur article,,,,thanku so much

  72. draherbal

    with a diagram can be seen apparently from one component to the other components of related this way will be easier for people to understand the meaning

  73. deepak

    Thanks. My concept is clear from it.

  74. sekate mubaraka

    exact requests have been provided best arrangement of databases

  75. Taukir Ahamd

    best defination and example

  76. Shaik Imran

    nice… Insha allah it may help me in designing ERD for my project…

  77. Cool post! 🙂
    Check out my blog too 🙂

  78. Mutahir NAseer

    Very Nice Answer and m really satisfied from it and also my concept is clear from it .

  79. Zahida Laghari

    nicelly defined , i want to make ER diagram for press club. I have some confusions but
    after visit this website i have believe Insha Allah i will make easilly.

  80. Eugene Alza

    Its soo hard and I am thinking deeply in my project Callisto Groceru Store. I dont know what is the flow of this grocery store

  81. ALEX O.

    you’re a genius,i cherished you.

  82. AK

    I was just wondering…I have an application form with me…the link is attached below. Could you please tell me what entities exist within this application form?
    For instance, one entity would be applicant—> attributes consisting of Fname, Lname, address…etc

    Your help would be greatly appreciated.

    Application form:
    http://dairyqueenwest.com/employmentapplication.pdf

  83. ASHISH KUMAR

    its an amazing ans ,and i am so satisfied with this ans

  84. Tharindu

    Good Learning Web Site

  85. ammar

    nice,and very helpful for our subejct in database management system……….

  86. thanks dude very usefull for me…….

  87. simply superb n easy…..
    thank u….

  88. parkash

    Nice…… thank u………..

  89. Nishadha

    Hi Sachin,
    Relationships can have their own attributes as well.

  90. Sachin

    I have still confusion on creating a relationship between two entities,does relationship block have also attributes of its own please help me with this.

  91. Lahiur

    Thanks…..really good for beginners. it is very good if you can add some solved question regarding ER diagrams….. 🙂

    • Nishadha

      Hi Lahiur,
      We’ll try to add some example questions in the future.

  92. Latyfa

    Simple, clear, easy.
    Thank you so much, that was really helpful.

  93. kandyjet

    very nice explanation. Thank you for the time.

  94. dinesh92

    i have some five problem like this can u help?
    1.Cargo Tracking Management System
    2.Supermarket Sales and Inventory Control System
    3.Emergency Call Management System
    4.Job Management System

    I want to what are the entities of these problems?

  95. Rudresh DN

    Its really good. Understanding the basic concepts of ER diagram with simple language with very good examples. It is easy to for us to know the contents. Thank You Sir.

  96. TAPAS

    thanks,very good explanation for all.

  97. MULUKEN ASHAGRIE

    I HAVE GOTE A GOOD HELP.THANK U!

  98. brunswick

    hey, brow.. nice job.. thanks for this.. it gave us so much help.. thanks brow..

  99. Tushar

    what exactly connector image in entity relationship diagram????

  100. nishath

    Examples are very simple and useful to understand ER Diagram.But if you take a simpl eproblem statement and explain how to identify entity,relationships etc… it would be more helpful to understand.

  101. Inder

    Draw ER diagram for the following “A
    teacher can teach many courses. A student
    can enrol in many courses. A course may
    be a part of one or many programmes. A
    teacher can be mentor of many students,
    however a student can have only one
    mentor.”

    Can you answer above Q Please

    • Dart Vader

      Inder, I know I’m replying quite late, but tell me if the correct answer is what I thought: to put every relation as 1..n, with one exception: the teacher/student relation. Here I put 1 in the Teacher side and 1..n in the student’s side. Is it correct? Thanks!

    • Just wassam

      we have teacher , students,course ,programmes as entities . first of all, the relationship among teacher and courses are (teach) and it should be many to one due a teacher can teach many course but the course should take by one teacher. the second relationship between student and course is (Enrol in) beacuse and it should be one to many. the third relationship is course and programmes . im so tired hhhhhhh to write buishut

  102. Qaiser

    the best website..!

  103. thanks a lot..nicely written…

  104. THIS IS VERY RELEVANT FOR MY SAAD PAPER EXAM

  105. prasanna

    actually,this is good stuff…thanks lots…

  106. Sofyan Gustaf

    Very useful
    Explanation is very clear

  107. Aditya Bhowmick

    Thank you sir ,I don’t know how to create a ERD, but now I clear this.

  108. Thanks for sharing , it is very useful for database designing.

  109. nikhil

    cleared my most of the doubts , thank you 😀

  110. kavi

    vry clear explanation

  111. M.RAMAR

    i want a relationship between er diagram and uml diagram

  112. Giedre

    Hi, I have to do an ER model for a travel game app but we have not been shown how in college. Can anyone please give me some ideas on how to go about this.

    The player or multiple players are required to navigate their way to the objective location using the transport infrastructure in a city or area, the games A.I places them in. The maps will be updated on a frequent basis to add variety to the user’s experience.

    Thanks

  113. benzie

    superb examples of ERD

  114. benzie

    A very clear explanation of ERD with the aid of diagrams.thanx.

  115. asad

    best example of ERD

  116. sheha

    Thank u ,this was very big help for us….

  117. suman

    gud explanation…

  118. Aseem

    A lucid and elaborate explanation. Appreciable.

  119. Vik

    Very to the point and clear explanation. Good read to refresh the concepts just in few minutes. Thanks.

  120. Ashish Garg

    Its interesting… Nice presentation…. Thnx

  121. gopika

    this is very useful for us. so easy to understand.

  122. ratul

    thanx a Lot….

  123. utpal swain

    i cleared much of my concept and doubts…….thanks

  124. Angel

    very nice simple and attractive explanations.

  125. Naresh

    Ya its very good explanation about ER-Diagrams

  126. minie

    Jus wrote my Database exam, wish id seen this much earlier.

  127. maina

    i need a ISA relationship with some example

  128. Ankit Doshi

    I am an Engineering Student and needed this for my exams.
    I can now surely bet on it that I can crack any ER-Diagram
    Thanks to author.

  129. Pradeep Alahakoon

    Information in this site are very usefull.tankx v m.

  130. A very good explanation for ER diagrams.

  131. MalcolmT

    The model that you espouse (attributes in ovoids, aka ‘the lollipop model’) is OK for small systems with very limited number of attributes per entity. Unfortunately, some students try to use it for llarger assignments (20 entities with up to 20 attributes per entity) and the whole model becomes unreadable unless they use A2-sized paper. If I never see another model of this type, it will too soon!!

  132. tanvir

    best sites for erd diagram. can any one tell me the date of the artical posted??

Leave a Comment

*
*

This blog uses premium CommentLuv which allows you to put your keywords with your name if you have had 9 approved comments. Use your real name and then @ your keywords (maximum of 3)
Back to top