How to Draw ERD
ERDs may look daunting, but they’re not as difficult as they appear. Most entity-relationship diagrams can be built with symbols in our flowchart shape library or ERD shape library. Follow these steps to make one of your own!
Lucidchart is built specifically for making entity-relationship diagrams. Use our ER templates or import your database structure to automate the process. Start a free account now.Try it now Sign up free
SELECT A MEDIUM
If you have an existing database that needs to be modeled, a full-featured software program like Lucidchart is ideal, since it can automatically generate ERDs based on real-life data structures. To use this functionality, open the ERD shape library in Lucidchart and click “Import”. Then follow the instructions found in this tutorial.
Computer software is also a good choice for creating entity-relationship diagrams from scratch, since complex shapes and connectors are pre-built and easy to move throughout the modeling process. For the purposes of this guide, we’ll proceed as though you’re using Lucidchart.
IDENTIFY THE COMPONENTS
ERDs have three main components:
- Entities represent people, places, items, events, or concepts.
- Attributes, also known as data elements, model characteristics of an entity.
- Relationships show the connection between two or more entities.
Before you start dragging out shapes and labeling them, be sure to differentiate between these groups. Identify your entities, determine significant interactions between them, and analyze the nature of the interactions.
There's one more concept you should understand before creating an ERD: data model levels. An entity-relationship diagram will occupy one of three data modeling levels: conceptual, logical, or physical. Most ERDs begin as a conceptual model, since they are the simplest and most high-level diagrams. A conceptual ER diagram will become more detailed and complex as you move to a logical and then a physical model. As the name suggests, this last level demonstrates how to physically implement a model's information within a database. See our page on ERD symbols for more information on data models and ERD symbols.
The shapes you use will depend on which model type your diagram falls under. When in doubt, begin with a conceptual ERD.
ADD SHAPES AND CONNECTORS
Drag shapes from the toolbox to the canvas, then name each element. In simple conceptual diagrams, entities are represented by rectangles, attributes by ovals, and relationships by diamonds. These can be found by clicking "More Shapes" in Lucidchart and selecting the UML Entity Relationship shape library. For more complex diagrams, the Entity Relationship shape library features tables which include fields, keys, and types. Aspects from either model may spill over into the logical data model, depending on the notation style you choose.
Link shapes with specialized connectors that express both cardinality and ordinality. Cardinality specifies how many instances of an entity relate to another instance of an entity, while ordinality describes the relationship as either mandatory or optional. In Lucidchart, cardinality can be shown by drawing a line and changing its style to indicate a one-to-one relationship, one-to-many relationship, or any other relationship. You can demonstrate ordinality by drawing either a single line or a double line—the former indicates a relationship between entities, while the latter shows a constraint that forces total participation in the relationship.
It’s easy to clean up even the most complicated entity-relationship diagrams. Just click on an ERD shape and use the context panel to manage the look and functionality of headers, rows, and fields.
When your diagram is complete, don’t publicly unveil it before consulting your entire team. Entity-relationship diagrams are most useful when understood by designers, developers, managers, and end users; your teammates can point out any weaknesses that you may have overlooked.
With Lucidchart, you can easily create professional-looking ERDs, data flows, and other specialized diagrams, right in a web browser. Start a free account and see for yourself.