Reverse Engineering of Database in MySQL Workbench



Reverse Engineering of Database in MySQL Workbench

Reverse Engineering of Database in MySQL Workbench

Previous Video (Forward Engineering of Database in MySQL)
https://youtu.be/B0aD6yTrT5k

ER diagrams are a useful tool for understanding and modeling and design of databases.

We normally build a physical database from the ER diagram – this is called forward engineering. But there are times when you want to do the opposite – create a diagram from the existing database schema. This task is called reverse engineering, as you first have a working tool and you create a model from it.

Since reverse engineering is converting live database schema into a model, we need to understand how models work in MySQL Workbench.

Models are a separate entity from the databases you are connected to and are stored locally on your disk.

Model
A model is a top-level object used for modeling in MySQL Workbench – it holds:

schemas that contain tables, views, and routines,
EER diagrams.
Physical Schemas
Schema is a grouping of database objects – tables, views, and routines. It is the same as a schema in MySQL database (or other databases).

By default, each model has an empty my schema. You don’t need it and it can be deleted.

Diagrams
The model can hold multiple ERD diagrams. Diagram can contain elements (tables, views, etc.) from schemas but are independent of them – each diagram can contain elements from different schemas.

Reverse engineering
To reverse engineer database go to the menu Database and choose Reverse Engineer… option.

Comments are closed.