postgresql 用Postgresql生成数据库表图的工具?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3223770/
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-09-10 22:36:59  来源:igfitidea点击:

Tools to generate database tables diagram with Postgresql?

postgresqldiagram

提问by Hannoun Yassir

Are there any free tools to generate tables diagrams with Postgresql?

是否有任何免费工具可以使用 Postgresql 生成表格图表?

回答by Jurgen

I love schemaspyfor schema visualisations. Look at the sample output they provide, and drool. Note the tabs!

我喜欢用于模式可视化的schemaspy。看看他们提供的示例输出,流口水。注意标签!

You'll need to download the JDBC driver here, then your command should look something like:

您需要在此处下载JDBC 驱动程序,然后您的命令应如下所示:

java -jar schemaspy-6.0.0-rc2.jar -t pgsql -db database_name -host myhost -u username -p password -o ./schemaspy -dp postgresql-9.3-1100.jdbc3.jar -s public -noads

Sometimes using options -portwill not working if your database has diferrent port, so you have to add manual port after host parameter, for example:

-port如果您的数据库具有不同的端口,有时使用选项将不起作用,因此您必须在主机参数后添加手动端口,例如:

java -jar schemaspy-6.0.0-rc2.jar -t pgsql -db database_name -host myhost:myport -u username -p password -o ./schemaspy -dp postgresql-9.3-1100.jdbc3.jar -s public -noads

You'll need to install graphvizas well if you want graphics (apt-get install graphvizfor debian based distros).

graphviz如果您想要图形(apt-get install graphviz对于基于 debian 的发行版),您也需要安装。

回答by Sualeh Fatehi

SchemaCrawler for PostgreSQLcan generate database diagrams from the command line, with the help of GraphViz. You can use regular expressions to include and exclude tables and columns. It can also infer relationships between tables using common naming conventions, if not foreign keys are defined.

SchemaCrawler for PostgreSQL可以在 GraphViz 的帮助下从命令行生成数据库图表。您可以使用正则表达式来包含和排除表和列。如果未定义外键,它还可以使用通用命名约定推断表之间的关系。

回答by Zane

Quick solution I found was inside the pgAdmin program for windows. Under Tools menu there is a "Query Tool". Inside the Query Tool there is a Graphical Query Builder that can quickly show the database tables details. Good for a basic view

我发现的快速解决方案是在 Windows 的 pgAdmin 程序中。在工具菜单下有一个“查询工具”。查询工具内部有一个图形查询生成器,可以快速显示数据库表的详细信息。适合基本视图

回答by Taylored Web Sites

Just found http://www.sqlpower.ca/page/architectthrough the Postgres Community Guide mentioned by Frank Heikens. It can easily generate a diagram, and then lets you adjust the connectors!

刚刚通过 Frank Heikens 提到的 Postgres 社区指南找到了http://www.sqlpower.ca/page/architect。它可以轻松生成图表,然后让您调整连接器!

回答by Faheem Mitha

PostgreSQL Autodochas worked well for me. It is a simple command line tool. From the web page:

PostgreSQL Autodoc对我来说效果很好。它是一个简单的命令行工具。从网页:

This is a utility which will run through PostgreSQL system tables and returns HTML, Dot, Dia and DocBook XML which describes the database.

这是一个实用程序,它将运行 PostgreSQL 系统表并返回描述数据库的 HTML、Dot、Dia 和 DocBook XML。

回答by leonbloy

Inside Eclipse I've used the Clay plugin(ex Clay-Azurri). The free version allows to introspect ("reverse engineer") an existing DB schema (via JDBC) and make a diagram of some selected tables.

在 Eclipse 中,我使用了Clay 插件(例如 Clay-Azurri)。免费版本允许内省(“逆向工程”)现有的 DB 模式(通过 JDBC)并制作一些选定表的图表。