What is an ER diagram of a Database?

Sweta Barnwal
3 min readFeb 5, 2021

--

Today’s agenda-

What is an ER diagram or ER model in a database?

Components of ER diagram

How to create an ER diagram of a database using MySQL Workbench?

What is an ER diagram or ER model in a database?

An Entity-Relationship (ER) Diagram is a type of flowchart that illustrates how “entities” such as people, objects, or concepts relate to each other within a system. It is also known as ERDs or ER Models. They use a defined set of symbols such as rectangles, diamonds, ovals, and connecting lines to depict the interconnectedness of entities, relationships, and their attributes. They mirror grammatical structure, with entities as nouns and relationships as verbs.

Let get familiar with few terms -

Entity: Entity is an object with physical existence in the real world.

Entity set: An entity set is a group of entities that poses the same set of attributes. Each entity in an entity set has its own set of values for the attributes which distinguish it from other entities in a table.

Attribute: An attribute is a property or characteristic of an entity.

Components of ER diagram

Image Source: Author

Pictorial representation of components of ER model-

How to create an ER diagram of a database using MySQL Workbench?

One should make sure that they have created a Database and Table in the MySQL server.

The steps for creating the ER in MySQL Workbench Community Edition are:

Step 1: Select Reverse Engineer from the Database menu.

Step 2: Select your connection from the drop-down menu and click Next.

Step 3: It will fetch the information it needs. Click Next.

Step 4: Select your Database from the MySQL Server for which you want to create the ER Diagram (in our case the database name is “company”), then click Next.

Step 5: It will retrieve the information it needs. Click Next.

Step 6: Leave Import MySQL Table Objects and Place imported objects on a diagram selected and click Execute.

Step 7: After the Reverse Engineering Process gets completed successfully, click Next.

Step 8: Click on Finish

Your ER diagram is ready. Now, all you need to do is to rearrange and connect the entities(Since, here in the diagram entities aren’t connected. One needs to connect them.)

That’s all in this article. Keep learning, keep growing.

Thank you!

--

--