如何在mysql中创建ER图

发布于 2024-11-26 01:43:58 字数 147 浏览 4 评论 0原文

我正在使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

醉酒的小男人 2024-12-03 01:43:58

要在 MySQL 中创建 ER 图,请按照下列步骤操作:

1.首先在计算机中安装 MySQL Workbench

  1. 单击文件->导入->反向工程MySQL创建脚本。
  2. 单击浏览并选择 SQL 创建脚本。
  3. 确保选中“将导入的对象放置在图表上”。
  4. 单击执行按钮。
  5. 单击模型 -> 添加图表。
  6. 打开目录树并选择/拖动 ERR 图表上的表。

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.
浅浅淡淡 2024-12-03 01:43:58

我能找到的唯一可以生成不错的图形(不漂亮但很清晰)的免费应用程序是 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.

清风疏影 2024-12-03 01:43:58

打开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

enter image description here
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

梦年海沫深 2024-12-03 01:43:58

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.

就像说晚安 2024-12-03 01:43:58

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文