Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create E-R diagram in mysql

I am using MySQL. There are 28 tables in my database. I've tried to use MySQL Workbench to create E-R diagram. As there are 28 tables, everything is messed up in diagram using MySQL Workbench. Is there any way to create E-R Diagram which shows all relations properly between 28 tables??

Thanks

like image 562
bsm Avatar asked Jul 26 '11 11:07

bsm


People also ask

Can we make ER diagram in MySQL?

MySQL Workbench allows you to create entity relationship diagrams (ERDs) with relationships between the tables (one to one, one to many) and rearrange them as needed. Below we cover how to create an ERD from a downloaded SQL file.

What is ERD in MySQL?

An Entity Relationship Diagram (ERD) is a snapshot of data structures. An Entity Relationship Diagram shows entities (tables) in a database and relationships between tables within that database.

Can we generate ER diagram from database?

Lucidchart makes it easy to visualize your database structure and build ER diagrams online quickly and efficiently to save you time. Our ER diagram creator automatically generates your models and connections using our data import feature to structure your database tables and schemas directly onto the canvas.


2 Answers

The only free app I've been able to find that generates decent graphics (not beautiful but quite clear) is SchemaSpy. It's a command line Java program that generates quite comprehensive HTML documentation for any DBMS.

like image 98
Álvaro González Avatar answered Sep 24 '22 17:09

Álvaro González


To Create ER Diagram in MySQL follow these steps:

1.First install MySQL Workbench in your computer

  1. Click File->Import->Reverse Engineer MySQL Create Script.
  2. Click Browse and select your SQL create script.
  3. Make Sure "Place Imported Objects on a diagram" is checked.
  4. Click Execute Button.
  5. Click Model->Add Diagram.
  6. Open Catalog Tree and select/drag your tables on your ERR diagram.
like image 43
Waqar Khan Avatar answered Sep 22 '22 17:09

Waqar Khan