我有一个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图就会出现在屏幕上。
其他回答
我写了这个实用程序,它自动从postgres数据库生成DSL代码,然后你可以将其粘贴到dbdiagram中。io/d网站获取ER图表
https://github.com/nsingla/dbdiagrams
为此我们使用了DBVisualizer。
描述: 引用图是一个很好的特性,因为它自动以图形样式呈现所有主键/外键映射(也称为引用完整性约束)。表节点和关系是自动布局的,有许多可用的布局模式。生成的图形是唯一的,因为它以最佳且可读的布局显示所有信息。 来自网站
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图就会出现在屏幕上。
Postgresql_autodoc是执行此操作的cli。不做基数,但上面提到的GUI工具都不做。
pgAdmin 4版本30及更新版本可以从现有数据库生成ERD。只需右键单击数据库并选择Generate ERD。
推荐文章
- 输入文件似乎是一个文本格式转储。请使用psql
- 使用LIMIT/OFFSET运行查询,还可以获得总行数
- 当恢复sql时,psql无效命令\N
- 如何从命令行在windows中找到mysql数据目录
- 货币应该使用哪种数据类型?
- 如何添加列,如果不存在PostgreSQL?
- 如何找到MySQL的根密码
- 如何在Postgres中获得两个字段的MIN() ?
- 将表从一个数据库复制到另一个数据库的最简单方法?
- 截断Postgres数据库中的所有表
- 什么是分片,为什么它很重要?
- 如何连接列在Postgres选择?
- 数据库触发器是必要的吗?
- 为什么我应该使用基于文档的数据库而不是关系数据库?
- 哪个更快/最好?SELECT *或SELECT columnn1, colum2, column3等