我有一个PostgreSQL数据库。我想从数据库中生成ERD。有没有内置工具或者第三方工具?


当前回答

为此我们使用了DBVisualizer。

描述: 引用图是一个很好的特性,因为它自动以图形样式呈现所有主键/外键映射(也称为引用完整性约束)。表节点和关系是自动布局的,有许多可用的布局模式。生成的图形是唯一的,因为它以最佳且可读的布局显示所有信息。 来自网站

其他回答

我使用DrawERD为ERD和DB文件。https://drawerd.com

在我们的许多项目中,我们的团队使用Visual Paradigm从数据库中生成ER图。虽然我们主要在MS SQL和Oracle上工作,但据我所知,他们也支持一些其他的DBMS,如PostgreSQL, MySQL, Sybase, DB2和SQLite。

步骤:

Select Tools > DB > Reverse Database... from the toolbar of Visual Paradigm Keep the settings as is and click Next Select PostgreSQL as driver and provide the driver file there. You can simply click on the download link there to get the driver. Enter the hostname, database name, user and password, and then click Next They will then study your database and lists out the tables in it. Select the table to form an ERD and continue, and that's it. An ERD will be generated with the tables you selected presented.

顺便说一下,它们还支持从ERD生成和更新数据库模式。

希望这能有所帮助。: -)

更多关于从PostgreSQL数据库生成ERD的信息

你可以使用dbeaver来做到这一点。它允许您将ER图导出为png/svg等格式。

德布弗 - https://dbeaver.io/

双击一个模式(例如,模式->公共->表)并打开“ER图”选项卡(在“属性”选项卡旁边)

您可以从PgAdmin生成ER图。

打开PgAdmin 右键单击任何表并选择语句,它将显示两个窗口,一个是查询,另一个是图形窗口,因此您可以添加您想要生成图表的表。 保存方法:另存为,选择图形查询(图像)

也许可以看看AquaFold的Aqua Data Studio。它是一个具有实体关系图的数据库IDE。它还包括数据分析。它不是免费的,但考虑到它的功能,它的价格是非常合理的。