Skip to content

Fix DBeaver ER Diagram – Entities or Relations Not Showing

DodaTech Updated 2026-06-24 3 min read

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.

Refresh metadata first:

  1. In the Database Navigator, right‑click the database → Tools → Refresh ER Diagram Cache (or just press F5)
  2. Right‑click the database → View Diagram

Force include schema objects:

If tables still don't appear:

  1. In the Database Navigator, expand Schemas → your schema (e.g. public)
  2. Select all tables (Ctrl+A)
  3. 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.

Diagram toolbar buttons: Zoom, Layout, Export

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 F5 in the Navigator.
  • Use Open Schema Diagram instead of View Diagram to scope by schema.
  • Store diagrams as .erd files (Export button) so you don't lose layout after a cache refresh.
  • Increase metaCacheSize in DBeaver preferences for large databases.

Common Mistakes with er diagram

  1. Using head and tail instead of pattern matching, causing runtime errors on empty lists
  2. Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
  3. Using return to 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

**Q: Can I add comments or notes to the ER diagram?**

A: No — DBeaver's diagram is read‑only. For annotations, export the diagram and annotate in a separate tool.

**Q: How do I print or export the diagram?**

A: Click the Export button (floppy disk icon) → PNG, SVG, PDF, or GraphML.

**Q: Why does the diagram show system tables?**

A: Toggle Show system objects in the diagram toolbar. In the Navigator, uncheck Show system objects before opening the diagram.

**Q: Can I edit the diagram layout?**

A: Yes — drag tables to rearrange. The custom layout persists until the next refresh.


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