如何在mysql中创建ER图
我正在使用MySQL。我的数据库中有 28 个表。我尝试使用 MySQL Workbench 创建 ER 图。由于有 28 个表,使用 MySQL Workbench 的图表中的所有内容都混乱了。有没有办法创建 ER 图来正确显示 28 个表之间的所有关系?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
要在 MySQL 中创建 ER 图,请按照下列步骤操作:
1.首先在计算机中安装 MySQL Workbench
To Create ER Diagram in MySQL follow these steps:
1.First install MySQL Workbench in your computer
我能找到的唯一可以生成不错的图形(不漂亮但很清晰)的免费应用程序是 SchemaSpy 。它是一个命令行 Java 程序,可为任何 DBMS 生成相当全面的 HTML 文档。
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.
打开MySQL Workbench,然后转到数据库 -> 逆向工程(在此向导中,您可以有 7 个步骤来生成 ER 图)
1-连接选项:
For Stored Connection :( Select local instance )
对于密码:单击 Vault 中的 Store..,然后输入您的密码
,然后单击下一步。
2-连接到 DBMS:
Click on the next (In this step you do not need to do anything)
3-选择模式
Here, select your desire Schema in order to generate an ER Diagram
4-检索对象
Click on the next (In this step you do not need to do anything)
5-选择对象
In this step, you can click on the Show Filter to exclude some table if you like
在这里,我排除了 emailAddresses 表,以免在 ER 图
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
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
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
ERWin 是另一个好工具。允许您从 sql 代码生成 erd 以及从 er 图生成 sql 代码。它是一个拖放实用程序。
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是生成ERD并表示不同表之间关系的最佳工具之一。
它也是拖放实用程序,并提供对 mysql 数据库的完整访问。
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.