How To Draw Er Diagram For Database

Hi! You’ve stumbled upon the right place.

So you’re looking to learn how to draw an ER diagram for a database. That’s great, because it’s an incredibly useful skill to have. But maybe you’re feeling a little overwhelmed. Well, look no further! I’m going to walk you through the exact steps I used when learning how to draw ER diagrams myself—and make sure that you get it right the first time.

How To Draw Er Diagram For Database

Here’s the basic order to follow.

  1. Determine the Entities in Your ERD. Start by identifying the “what”s in your system or architecture. …
  2. Add Attributes to Each Entity. …
  3. Define the Relationships Between Entities. …
  4. Add Cardinality to Every Relationship in your ER Diagram. …
  5. Finish and Save Your ERD.

ERD stands for entity relationship diagram, which is a type of diagram that can help you create a clear visualization of your database design.

To learn more about the basics of entity relationship diagrams, check out our blog, What is an ER Diagram? This ER diagram tutorial will cover how to make an ERD anywhere, with specific tips for using Gliffy’s ERD tool. Read on to learn how to make an ER diagram or jump ahead to one of the following sections:

  • Why Draw an ER Diagram?
  • Video Tutorial: How to Draw an ER Diagram or Database Diagram
  • How to Draw an Entity Relationship Diagram
  • Why Draw an Entity Relationship Diagram Online?

Why Draw an ER Diagram?

ERDs, also called ER diagrams or ER models, are used to describe data and how pieces of data interact with one another. For this reason, ERDs are extremely important in database design and projects that require a clear structure of all data — think of it as the standardized way to draw a database diagram. By applying this standard, your team can easily understand the structure of a database or the information you collect within your system.

Video ER Diagram Tutorial: How to Draw a Database Diagram

Drawing entity relationship diagrams is easier if you choose to use online diagramming software. Check out Gliffy’s ER diagram tool for Confluence and Jira or start a free trial of Gliffy Online.

er diagram symbols

Conceptual ER diagram symbols

Conceptual Data Models establish a broad view of what should be included in the model set. Conceptual ERDs can be used as the foundation for logical data models. They may also be used to form commonality relationships between ER models as a basis for data model integration. All of the symbols shown below are found in the UML Entity Relationship and Entity Relationship shape library of Lucidchart.

ERD entity symbols

Entities are objects or concepts that represent important data. Entities are typically nouns such as product, customer, location, or promotion. There are three types of entities commonly used in entity relationship diagrams.

Entity SymbolNameDescription
Strong Entity SymbolStrong entityThese shapes are independent from other entities, and are often called parent entities, since they will often have weak entities that depend on them. They will also have a primary key, distinguishing each occurrence of the entity.
Weak Entity SymbolWeak entityWeak entities depend on some other entity type. They don’t have primary keys, and have no meaning in the diagram without their parent entity.
Associative entity symbolAssociative entityAssociative entities relate the instances of several entity types. They also contain attributes specific to the relationship between those entity instances.

ERD relationship symbols

Within entity-relationship diagrams, relationships are used to document the interaction between two entities. Relationships are usually verbs such as assign, associate, or track and provide useful information that could not be discerned with just the entity types.

Relationship SymbolNameDescription
Relationship SymbolRelationshipRelationships are associations between or among entities.
Weak Relationship SymbolWeak relationshipWeak Relationships are connections between a weak entity and its owner.

ERD attribute symbols

ERD attributes are characteristics of the entity that help users to better understand the database. Attributes are included to include details of the various entities that are highlighted in a conceptual ER diagram.

Attribute SymbolNameDescription
Attribute SymbolAttributeAttributes are characteristics of an entity, a many-to-many relationship, or a one-to-one relationship.
Multivalued Attribute SymbolMultivalued attributeMultivalued attributes are those that are can take on more than one value.
Derived Attribute SymbolDerived attributeDerived attributes are attributes whose value can be calculated from related attribute values.
Relationship SymbolRelationshipRelationships are associations between or among entities.

Diagramming is quick and easy with Lucidchart. Start a free trial today to start creating and collaborating.Make an ERD

Physical ER diagram symbols

The physical data model is the most granular level of entity-relationship diagrams, and represents the process of adding information to the database. Physical ER models show all table structures, including column name, column data type, column constraints, primary key, foreign key, and relationships between tables.

As shown below, tables are another way of representing entities. The key parts of Entity-relationship Tables are:

Fields

Fields represent the portion of a table that establish the attributes of the entity. Attributes are typically thought of as columns in the database that the ERD models.

Fields Shape

In the image above, InterestRate and LoanAmount are both attributes of the entity that are contained as fields.

Keys

Keys are one way to categorize attributes. ER diagrams help users to model their databases by using various tables that ensure that the database is organized, efficient, and fast. Keys are used to link various tables in a database to each other in the most efficient way possible.

Primary Keys

Primary keys are an attribute or combination of attributes that uniquely identifies one and only one instance of an entity.

Foreign Keys

Foreign keys are created any time an attribute relates to another entity in a one-to-one or one-to-many relationship.

Foreign Key Example

Each car can only be financed by one bank, therefore the primary key BankId from the Bank table is used as the foreign key FinancedBy in the Car table.  This BankID is able to be used as the foreign key for multiple cars.

Types

Types refer to the type of data in the corresponding field in a table. Types can also refer to entity types, which describe the composition of an entity; e.g., a book’s entity types are author, title, and published date.

ERD Tables

ER diagram notation

While crow’s foot notation is often recognized as the most intuitive style, some use OMT, IDEF, Bachman, or UML notation, according to their preferences. Crow’s foot notation, however, has an intuitive graphic format, making it the preferred ERD notation for Lucidchart. Consider using one of our Crow Foot ER Diagram templates.

Cardinality and ordinality

Cardinality refers to the maximum number of times an instance in one entity can relate to instances of another entity. Ordinality, on the other hand, is the minimum number of times an instance in one entity can be associated with an instance in the related entity.

Cardinality and ordinality are shown by the styling of a line and its endpoint, according to the chosen notation style.

ERD Notation

Leave a Comment