自动生成数据库图表 MySQL

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2488/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 11:53:27  来源:igfitidea点击:

Auto Generate Database Diagram MySQL

mysqldatabasedatabase-designdiagram

提问by cmcculloh

I'm tired of opening Dia and creating a database diagram at the beginning of every project. Is there a tool out there that will let me select specific tables and then create a database diagram for me based on a MySQL database? Preferably it would allow me to edit the diagram afterward since none of the foreign keys are set...

我厌倦了在每个项目开始时打开 Dia 并创建数据库图表。有没有一种工具可以让我选择特定的表,然后基于 MySQL 数据库为我创建一个数据库图表?最好它允许我在之后编辑图表,因为没有设置任何外键......

Here is what I am picturing diagram-wise (please excuse the horrible data design, I didn't design it. Let's focus on the diagram concept and not on the actual data it represents for this example ;) ):

这是我在图表方面所描绘的(请原谅可怕的数据设计,我没有设计它。让我们关注图表概念,而不是它在这个例子中代表的实际数据;)):

diagramsee full size diagram

图表见全尺寸图

回答by Michael Stum

Try MySQL Workbench, formerly DBDesigner 4:

试试 MySQL Workbench,以前是 DBDesigner 4:

http://dev.mysql.com/workbench/

http://dev.mysql.com/workbench/

This has a "Reverse Engineer Database" mode:

这有一个“逆向工程师数据库”模式:

Database -> Reverse Engineer

数据库 -> 逆向工程师

enter image description here

在此处输入图片说明

回答by Reinderien

I've recently started using http://schemaspy.sourceforge.net/. It uses GraphViz, and it strikes me as having a good balance between usability and simplicity.

我最近开始使用http://schemaspy.sourceforge.net/。它使用 GraphViz,我觉得它在可用性和简单性之间取得了很好的平衡。

回答by mlambie

On a Mac, SQLEditorwill do what you want.

在 Mac 上,SQLEditor会做你想做的事。

回答by mlambie

This http://code.google.com/p/database-diagram/will reverse engineer your database. Just do an export 'structure only' then paste the SQL into the tool.

http://code.google.com/p/database-diagram/将对您的数据库进行逆向工程。只需导出“仅结构”,然后将 SQL 粘贴到工具中即可。

回答by Juan Ignacio

Try MySQL Maestro. Works great for me.

试试MySQL 大师。对我很有用。

回答by Tauri Alfa

MySQL Workbench worked like a charm.

MySQL Workbench 工作起来很有魅力。

I just backed up database structure to SQL script and used it in "Create EER Model From SQL Script" of MWB 5.2.37 for Windows.

我刚刚将数据库结构备份到 SQL 脚本,并在 MWB 5.2.37 for Windows 的“从 SQL 脚本创建 EER 模型”中使用它。

回答by Mark Biek

I believe DB Designerdoes something like that. And I think they even have a free version.

我相信DB Designer会做类似的事情。而且我认为他们甚至有免费版本。

editNever mind. Michael's link is much better.

编辑没关系。迈克尔的链接要好得多。

回答by Hugo Silva

In MySql Workbench (6.0) its possible generate one diagram based on tables created. For that you should access to the tools bar, press Modeland forward Create Diagram from Catalog Objectsand done!

在 MySql Workbench (6.0) 中,它可能会根据创建的表生成一个图表。为此,您应该访问工具栏,按模型并转发从目录对象创建图表并完成!

回答by mb2015

Visual Paradigm for UML 9.0

UML 9.0 的视觉范式

It's awesome I used to work with mysql bench but for big databases (something like more than 300 tables) won't work very well but visual paradigm reverse database works so much better

很棒,我曾经使用 mysql bench 但对于大型数据库(比如超过 300 个表)不会很好地工作,但视觉范式反向数据库工作得更好

回答by Chris Murray

phpMyAdmin has what you are looking for (for many years now): It takes a small bit of configuration, but gives you additional benefits too: http://www.phpmyadmin.net/documentation/#pmadb

phpMyAdmin 拥有您正在寻找的东西(多年以来):它需要一些配置,但也为您提供了额外的好处:http: //www.phpmyadmin.net/documentation/#pmadb