开发者

How to create E-R diagram in mysql

开发者 https://www.devze.com 2023-03-23 03:14 出处:网络
I am using MySQ开发者_开发技巧L. 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 Wo

I am using MySQ开发者_开发技巧L. 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


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.


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.


ERWin is another good tool. Allowing you to generate erd from sql code and sql code from er diagrams. Its a Drag and Drop utility.


SQL yog is one of the best tool which generate ERD and represents the relationship between different tables. It is also drag and drop utility and provide complete access to your mysql database.


Open the MySQL Workbench and then go to Database -> Reverse Engineer (in this wizard you have 7 steps to generate the ER Diagram)

1-Connection Options:

For Stored Connection :( Select local instance )

For Password: Click on the Store in Vault.. and then enter your password

Then click on the next.

2-Connect to DBMS:

Click on the next (In this step you do not need to do anything)

3-Select Schemas

Here, select your desire Schema in order to generate an ER Diagram

4-Retrieves Objects

Click on the next (In this step you do not need to do anything)

5-Select Objects

In this step, you can click on the Show Filter to exclude some table if you like

How to create E-R diagram in mysql

Here, I exclude the emailAddresses table in order not to show that in the ER Diagram

6-Reverses Engineers

Click on the next (In this step you do not need to do anything)

7-Results

Click on the finish to see the Diagram
0

精彩评论

暂无评论...
验证码 换一张
取 消