如何从 SQL DDL 生成实体关系图?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/841541/
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
How to generate Entity-Relation diagram from SQL DDL?
提问by Petteri Hietavirta
For example DbVisualizer can be used to connect to a DB and create nice diagram out of existing tables and their relations. But in this specific case I do not have a live database but I have bunch of create table and alter statements.
例如,DbVisualizer 可用于连接到数据库并根据现有表及其关系创建漂亮的图表。但在这种特定情况下,我没有实时数据库,但我有一堆 create table 和 alter 语句。
Is there any tool to generate similar diagrams out of SQL DDL?
是否有任何工具可以从 SQL DDL 中生成类似的图表?
采纳答案by Tom H
I believe that Embarcadero's ERStudio can import a SQL script into a diagram, but it's a pricey tool to use just for something like this. You could always just create an empty database and run the scripts then point to that.
我相信 Embarcadero 的 ERStudio 可以将 SQL 脚本导入到图表中,但它是一个昂贵的工具,仅用于此类用途。您始终可以创建一个空数据库并运行脚本,然后指向该数据库。
回答by ahalls
I found the MySQL tool MySQL Workbench to do a great job. There is a Mac OS X version. More information can be found at http://dev.mysql.com/doc/index-gui.html.
我发现 MySQL 工具 MySQL Workbench 做得很好。有一个 Mac OS X 版本。更多信息可以在http://dev.mysql.com/doc/index-gui.html找到。
回答by Joshua Orvis
SQLFairy will generate graphics from plain SQL DDL files:
SQLFairy 将从普通 SQL DDL 文件生成图形:
回答by turtledove
Visual Paradigm for UMLcan do this.
UML 的 Visual Paradigm可以做到这一点。