How to Draw E R Diagram Using MySQL Database Engine

Identify the entities of the database according to the requirement of the organization or business., Define the characteristics of the entities by attributes The attributes can be singular noun or noun phrase It should be unique for a particular...

14 Steps 2 min read Advanced

Step-by-Step Guide

  1. Step 1: Identify the entities of the database according to the requirement of the organization or business.

    There are some general guidelines for naming the entities.

    The name of the entity should be a singular noun, concise (for ease); if abbreviations are used then it should be specific Spaces should be avoided.

    If more than one word is used then it should be separated by underscore ( _ ).
  2. Step 2: Define the characteristics of the entities by attributes The attributes can be singular noun or noun phrase It should be unique for a particular entity type

    , The relationships mirror business rules of the organization The relationship should be a verb phrase It should clearly explain the action being taken Cardinality
    - The relation can have one-to-one (1:1), one-to-many (1: m) or many-to-many (m: n) characteristics. , To open MySQL Workbench go to start, click all programs, MySQL and then select MySQL Workbench. , From the menu bar click on file and then new model.

    Again use the menu bar to click on model and choose add diagram. , The tables represent Business entities on the ERD.

    Select the table icon or press T from the vertical menu bar. ,, Double click on the table to open a window (table editor) at the bottom.

    This window provides options to enter the table name (entity). ,, Select the data type for each attribute from the drop down list as per the requirement.

    Select an attribute or group of attributes that uniquely identifies that table.

    That becomes the primary key for the table.

    Also select which attributes are non-null. ,, Select the characteristic /type of relation (1:1, 1: m, m: n) from the vertical menu bar.

    Then click on the two tables (one after other) to add the selected relation between the tables. ,, From the menu bar click on file, select save model as and give a proper file name to save the ERD.

    You can also save the ERD as a PDF file.

    To do this go to file, click on export and then select export as single page PDF.

    Give the file name and save it.
  3. Step 3: Build meaningful relationship among instances of one or more entities by creating relationship between them.

  4. Step 4: Now open MySQL Workbench.

  5. Step 5: Open the platform to draw the Entity Relation diagram.

  6. Step 6: Draw tables on the platform.

  7. Step 7: Move the mouse to the platform and click on the location where you want to place the table.

  8. Step 8: Name the table.

  9. Step 9: Add attributes to the tables (Attributes of The same table editor provides options to add the columns (attributes) to the table (entity).

  10. Step 10: Select the proper data type and primary key (Constraint).

  11. Step 11: Perform the same operation for all the remaining entities which have been identified as part of the business requirements.

  12. Step 12: Add relations to the tables (Entities).

  13. Step 13: Repeat the same action to add remaining identified relationships (Business rules) among tables (Entities).

  14. Step 14: Save the entity relation diagram (ERD).

Detailed Guide

There are some general guidelines for naming the entities.

The name of the entity should be a singular noun, concise (for ease); if abbreviations are used then it should be specific Spaces should be avoided.

If more than one word is used then it should be separated by underscore ( _ ).

, The relationships mirror business rules of the organization The relationship should be a verb phrase It should clearly explain the action being taken Cardinality
- The relation can have one-to-one (1:1), one-to-many (1: m) or many-to-many (m: n) characteristics. , To open MySQL Workbench go to start, click all programs, MySQL and then select MySQL Workbench. , From the menu bar click on file and then new model.

Again use the menu bar to click on model and choose add diagram. , The tables represent Business entities on the ERD.

Select the table icon or press T from the vertical menu bar. ,, Double click on the table to open a window (table editor) at the bottom.

This window provides options to enter the table name (entity). ,, Select the data type for each attribute from the drop down list as per the requirement.

Select an attribute or group of attributes that uniquely identifies that table.

That becomes the primary key for the table.

Also select which attributes are non-null. ,, Select the characteristic /type of relation (1:1, 1: m, m: n) from the vertical menu bar.

Then click on the two tables (one after other) to add the selected relation between the tables. ,, From the menu bar click on file, select save model as and give a proper file name to save the ERD.

You can also save the ERD as a PDF file.

To do this go to file, click on export and then select export as single page PDF.

Give the file name and save it.

About the Author

H

Hannah Johnson

Experienced content creator specializing in creative arts guides and tutorials.

140 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: