Cardinality views: Cardinality views can be shown as look-across or same-side, depending on where the symbols are shown.
 Cardinality constraints: Cardinality constraints are the minimum or maximum numbers that apply to a relationship.
Mapping natural language
ER components can be equated to parts of speech. This shows how an ER diagram compares to a grammar diagram:
Â
Â
The database query language ERROL actually mimics natural language constructs. ERROL is based on reshaped relational algebra (RRA) and works with ER models, capturing their linguistic aspects.
ERD symbols and notations
The following images show several ERD notation systems. Check out the ERD symbols and notation page for more information.
Chen notation style
Crowâs Foot/Martin/Information Engineering style
Bachman style
IDEF1X style
Barker style
Some teams also apply UML notation when they want ER-style relationships expressed with object-oriented conventions. This doesnât mean that the ERD becomes a type of UML diagram. Instead, it simply means that UML notation is used to describe entity relationships and cardinality. With the UML notation, relationships are shown as a solid line connecting two entities. Cardinalities are indicated on the line (for example, 1..1 indicates one-to-one, or 1..* for one-to-many) and you can add verb phrases (like âmade byâ or âordered byâ) to define the relationship between the entities.
Examples
Following are examples of ERD diagrams made in each system.
Â
Conceptual, logical, and physical data models
ER models and data models are typically drawn at up to three levels of detail:
Â
Conceptual data model
Â
This model shows the highest-level view containing the least detail. Its value is capturing the overall scope of the model and portraying the system architecture. For a system of smaller scope, you can start with the logical model.
Â
Logical data model
This model shows more detail than a conceptual model and defines operational and transactional entities. The logical model is independent of the technology in which it will be implemented.
Â
Physical data model
One or more physical models may be developed from each logical model. The physical models must show enough technological detail to produce and implement the actual database.
Â
As systems grow, it can be difficult to capture every operational detail in a single, readable visual. If necessary, you can use more than one chart and create different levels of ERDs as needed. Smaller systems, on the other hand, can often be easily represented.
Limitations of ER diagrams and models
ER diagrams and models arenât the best fit for every type of database. Here are several reasons they may not be the right visual for your use case:
Â
-
Not for unstructured data: Unless the data is cleanly delineated into different fields, rows, or columns, ER diagrams are probably of limited use. The same is true of semi-structured data because only some of the data will be useful.
-
Difficulty integrating with an existing database: Using ER models to integrate with an existing database can be a challenge because of the different architectures.Â
Relatedly, if your primary persistence layer is non-relational, you may need a different modeling approach than a classic ERD.
How to create a basic ER diagram
-
Purpose and scope: Define the purpose and scope of what you're analyzing or modeling.
-
Entities: Identify the entities that are involved. When you're ready, start drawing them in rectangles (or your system's choice of shape) and labeling them as nouns.
-
Relationships: Determine how the entities are all related. Draw lines between them to signify the relationships and label them. Some entities may not be related, and that's fine. In different notation systems, the relationship could be labeled in a diamond, a rectangle, or directly on top of the connecting line.
-
Attributes: Layer in more detail by adding key attributes of entities. Attributes are often shown as ovals.
-
Cardinality: Show whether the relationship is one-to-one, one-to-many, or many-to-many.
Â
If youâre diagramming a large system, consider splitting the work into multiple diagrams (for example, one conceptual overview plus one or more physical models) to keep each visual readable.
How to create an ER diagram in Lucidchart
-
Open a new Lucidchart document
Create your diagram from scratch or save time by starting with one of Lucidchartâs premade ER diagram templates. The important thing is to show the level of detail necessary for your purpose. You might want to draw a conceptual, logical or physical model, depending on the detail needed.Â
-
Enable ERD shape libraries
Click More shapes on the left side of the editor, and ensure that the Entity Relationship box is checked in the shape libraries list.Â
-
Drag and drop shapes
Start adding shapes to the canvas to represent all your entities and relationships by clicking on the desired shape, and dropping it where you want it. Make sure all your entities and relationships are labeled and that your diagram supports all the data you need to store.
-
Connect shapes
Click on any shape and then drag a line out from one of the circles that appears to connect it to any other shape, so you can show the relationship between entities. Watch for redundant entities or relationships. And if you're troubleshooting a database problem, watch for holes in relationships or missing entities or attributes.
-
Share your ER diagram
Because ERDs are visual and standardized, they can also serve as a collaboration artifact that teams review and refine together. You can easily share your network diagram with others either via email, Slack, or shareable link. Click Share in the top-right corner of the screen, and a pop-up will appear. Choose how you'd like to share your diagram and set the appropriate level of permissions.
Â