ER diagram
Right-click a database and choose ER Diagram. NabuSQL reads the foreign keys defined in the schema and draws the tables with the relationships between them.
What it shows
Each box is a table with its columns; each line is a foreign key. It is a fast way to see how an unfamiliar schema fits together, and to spot the tables everything else points at.
The diagram is generated from the live schema every time you open it, so it cannot drift out of date the way a hand-drawn diagram does.
"No foreign key relations in this database"
If you see this message, the schema has no foreign key constraints — which is common in two cases:
- MyISAM tables in MySQL. The engine ignores foreign keys. Converting to InnoDB in Tables and columns → Options makes the relationships real, and they then appear in the diagram.
- Relationships enforced in application code only. If
orders.customer_idmatchescustomers.idpurely by convention, the database does not know about it and neither does the diagram.
Adding real constraints buys more than a picture: the server starts rejecting orphaned rows.
Reading a large schema
On a schema with hundreds of tables the diagram gets dense. Two things help:
- Open the ER diagram for the specific database you care about rather than the largest one.
- Use Structure Compare when your actual question is "what changed between these two databases" rather than "how is this one shaped".
