Generate ER Diagram from existing MySQL database, created for CakePHP

MysqlCakephpMysql WorkbenchReverse EngineeringErd

Mysql Problem Overview


For CakePHP application, I created MySQL database.

Which tool to be used to create ER Diagram of database? Fields and relations between tables are created in a way cakePHP likes.

thank you in advance!

Mysql Solutions


Solution 1 - Mysql

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.

Solution 2 - Mysql

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.

Solution 3 - Mysql

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.

Solution 4 - Mysql

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/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser198003View Question on Stackoverflow
Solution 1 - Mysqlvarun249View Answer on Stackoverflow
Solution 2 - MysqlRabidFireView Answer on Stackoverflow
Solution 3 - MysqlSumanView Answer on Stackoverflow
Solution 4 - MysqlAleksandar PavićView Answer on Stackoverflow