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


当前回答

Open MySQL Workbench. In the home screen click 'Create EER Model From Existing Database'. We are doing this for the case that we have already made the data base and now we want to make an ER diagram of that database. Then you will see the 'Reverse Engineer Database' dialouge. Here if you are asked for the password, provided the admin password. Do not get confused here with the windows password. Here you need to provide the MySQL admin password. Then click on Next. In the next dialouge box, you'll see that the connection to DBMS is started and schema is revrieved from Database. Go next. Now Select the Schema you created earlier. It is the table you want to create the ER diagram of. Click Next and go to Select Objects menu. Here you can click on 'Show Filter' to use the selected Table Objects in the diagram. You can both add and remove tables here.Then click on Execute.

6.当您点击Next和Finish时,所需的ER图就会出现在屏幕上。

其他回答

您可以从PgAdmin生成ER图。

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

Open MySQL Workbench. In the home screen click 'Create EER Model From Existing Database'. We are doing this for the case that we have already made the data base and now we want to make an ER diagram of that database. Then you will see the 'Reverse Engineer Database' dialouge. Here if you are asked for the password, provided the admin password. Do not get confused here with the windows password. Here you need to provide the MySQL admin password. Then click on Next. In the next dialouge box, you'll see that the connection to DBMS is started and schema is revrieved from Database. Go next. Now Select the Schema you created earlier. It is the table you want to create the ER diagram of. Click Next and go to Select Objects menu. Here you can click on 'Show Filter' to use the selected Table Objects in the diagram. You can both add and remove tables here.Then click on Execute.

6.当您点击Next和Finish时,所需的ER图就会出现在屏幕上。

我写了这个实用程序,它自动从postgres数据库生成DSL代码,然后你可以将其粘贴到dbdiagram中。io/d网站获取ER图表

https://github.com/nsingla/dbdiagrams

ERBuilder可以从PostgreSQL数据库生成ER图(反向工程特性)。

生成ER图的步骤如下:

•点击菜单->文件->逆向工程

•点击新建连接

•填写PostgresSQL连接信息

•点击确定

•点击“下一步”

•选择你想要逆向工程的对象(表,触发器,序列.....)。

•点击下一步。

如果您使用的是试用版,则会显示您的ERD 自动。 如果你使用的是免费版,你需要拖动 并从应用程序左侧的树视图中删除表

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

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

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