I finally found a simple way to generate entity relationship diagram an existing database with MySQL Workbench.
In order to achieve this, we must use MySQL Workbench. It is a free application from Oracle and MySQL can be downloaded from you here.
Once installed and configured our connection to the database we want to get your "Entity-Relationship Diagram," we go to the top menu Database and select the option Reverse Engineer (Reverse engineering):
In the next window we select which objects you want to include in our diagram. In our select all. It is important to select the check that appears at the bottom. Sometimes I happened to select leaves me because maybe there are too many objects selected. press Next to continue:
press Finish to complete and should show the diagram with all the tables in our database. Sometimes it only matters the tables without establishing relations between them. This is because such information does not exist in the tables, very common in free software applications.
If we look closely, the tables have drawn relationships is because they have that information created:
but that does not have such information created:
For that reason, does not draw relationships in the diagram.
Once we have the complete diagram, we can print it and take notes of each of the tables and put them to our liking to make it easier to read the diagram.
If we position on a relationship between tables, it is shaded and indicates which table fields are those that are related. This is very useful because visually it is not easy to know which columns are related. There are many Free Software applications that use a simple nomenclature in the fields and even sometimes give generic names because they are trying to primary keys that are used for many types of entities, so the power to visualize this makes it easier develop your SQL queries:
And the other thing that is also very useful, is that you can change the type of diagram for the above is simpler still. From the top menu, in ModelAnd the menu Relationship Notation you can select the style diagram. Default is selected "Crow's Foot (IE)" but if we select Connect to Columns we can see directly the relations on the fields involved.
The diagram would be shown as follows, also indicating the cardinality of relations with clearer symbols if we do not have much knowledge of UML:
The only downside of it is that draws no relations with horizontal and vertical lines. Use diagonal lines and drawing is a little uglier. But at least it helps to interpret the scheme.
I hope you liked it and will serve as useful.