What is an ER diagram of a Database?

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?

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?

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!

3rd year CSE student at IIITKALYANI , enthusiastic learner and explorer