从为 CakePHP 创建的现有 MySQL 数据库生成 ER 图

发布于 2024-10-05 01:47:38 字数 1539 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

你げ笑在眉眼 2024-10-12 01:47:39

使用 MySQL 工作台。创建数据库的 SQL 转储文件

按照以下步骤操作:

  1. 单击文件 -> 导入 -> 反向工程 MySQL 创建脚本
  2. 单击浏览并选择 SQL 创建脚本。
  3. 确保选中“将导入的对象放置在图表上”。
  4. 单击执行按钮。
  5. 你完成了。

Use MySQL Workbench. create SQL dump file of your database

Follow below steps:

  1. Click File->Import->Reverse Engineer MySQL Create Script
  2. Click Browse and select your SQL create script.
  3. Make Sure "Place Imported Objects on a diagram" is checked.
  4. Click Execute Button.
  5. You are done.
落叶缤纷 2024-10-12 01:47:39

尝试 MySQL Workbench。它包含非常好的数据建模工具。查看他们的屏幕截图以获取 EER 图(增强型实体关系,这是一种升级版的 ER 图) 。

这不是 CakePHP 特有的,但您可以修改选项,以便外键和连接表遵循 CakePHP 使用的约定。一旦您制定了规则,这将简化您的数据建模过程。

Try MySQL Workbench. It packs in very nice data modeling tools. Check out their screenshots for EER diagrams (Enhanced Entity Relationships, which are a notch up ER diagrams).

This isn't CakePHP specific, but you can modify the options so that the foreign keys and join tables follow the conventions that CakePHP uses. This would simplify your data modeling process once you've put the rules in place.

双手揣兜 2024-10-12 01:47:39

如果您不想安装 MySQL Workbench,并且正在寻找在线工具,这可能会有所帮助:http ://ondras.zarovi.cz/sql/demo/

我经常使用它为我构建的各种应用程序创建简单的数据库架构。

If you don't want to install MySQL workbench, and are looking for an online tool, this might help: http://ondras.zarovi.cz/sql/demo/

I use it quite often to create simple DB schemas for various apps I build.

眼眸里的快感 2024-10-12 01:47:39

CakePHP 旨在用作 Ruby on Rails 框架克隆,以 PHP 完成,因此对底层数据库的任何逆向工程都是毫无意义的。 EER 图应该从模型层进行逆向工程。

Ruby 确实存在这样的工具
在这里您可以看到从模型逆向工程的Redmine数据库EER图。不是来自数据库。
http://redminecookbook.com/Redmine-erd-diagrams.html

使用以下工具:
http://rails-erd.rubyforge.org/
http://railroady.prestonlee.com/

CakePHP was intended to be used as Ruby on Rails framework clone, done in PHP, so any reverse-engineering of underlying database is pointless. EER diagrams should be reverse-engineered from Model layer.

Such tools do exist for Ruby
Here you can see Redmine database EER diagrams reverse-engineered from Models. Not from database.
http://redminecookbook.com/Redmine-erd-diagrams.html

With following tools:
http://rails-erd.rubyforge.org/
http://railroady.prestonlee.com/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文