Fix DBeaver ER Diagram – Entities or Relations Not Showing
In this tutorial, you'll learn about Fix DBeaver ER Diagram. We cover key concepts, practical examples, and best practices.
You open DBeaver's ER Diagram for a database and see a blank canvas — or only a few tables with no relation lines. The database has dozens of tables with foreign keys, but DBeaver doesn't draw them.
Wrong ❌
You right‑click a database → View Diagram → get an empty pane. You try dragging tables from the Database Navigator onto the diagram — still no relation lines.
You check the schema and confirm foreign keys exist:
SELECT COUNT(*) FROM information_schema.table_constraints
WHERE constraint_type = 'FOREIGN KEY';
-- count: 47
But the diagram shows zero connections.
Right ✅
Refresh metadata first:
- In the Database Navigator, right‑click the database → Tools → Refresh ER Diagram Cache (or just press
F5) - Right‑click the database → View Diagram
Force include schema objects:
If tables still don't appear:
- In the Database Navigator, expand Schemas → your schema (e.g.
public) - Select all tables (
Ctrl+A) - Right‑click → View Diagram
Show relations:
Click the Layout dropdown in the diagram toolbar and pick an automatic layout (e.g. Hierarchy Layout or Tree Layout). All foreign‑key lines should appear with cardinality markers.

If lines are still missing, verify DBeaver can read foreign keys:
SELECT tc.table_schema, tc.table_name, kcu.column_name,
ccu.table_name AS referenced_table, ccu.column_name AS referenced_column
FROM information_schema.table_constraints tc
JOIN key_column_usage kcu ON tc.constraint_name = kcu.constraint_name
JOIN constraint_column_usage ccu ON tc.constraint_name = ccu.constraint_name
WHERE tc.constraint_type = 'FOREIGN KEY'
AND tc.table_schema = 'public';
If this returns rows, DBeaver can see the FKs. Try closing and reopening the diagram.
Root Cause
DBeaver's ER diagram relies on a cached metadata snapshot. If the cache is stale, newly created tables or foreign keys don't render. Also, diagrams only show tables from a single schema by default — cross‑schema FKs may be invisible.
Prevention
- Refresh the database metadata regularly with
F5in the Navigator. - Use Open Schema Diagram instead of View Diagram to scope by schema.
- Store diagrams as
.erdfiles (Export button) so you don't lose layout after a cache refresh. - Increase
metaCacheSizein DBeaver preferences for large databases.
Common Mistakes with er diagram
- Using
headandtailinstead of pattern matching, causing runtime errors on empty lists - Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
- Using
returnto exit a function early instead of wrapping a pure value in the monad
These mistakes appear frequently in real-world DBEAVER code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
ER diagramming is covered in depth in the DodaTech DBeaver Data Modeling course.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro