Schema Visualizer
Import a live database schema or paste DDL and see it as an interactive ER diagram.
Overview
Schema Visualizer turns CREATE TABLE SQL statements into an interactive entity-relationship diagram. Paste DDL text, upload a .sql file, or import a JSON schema — the visualizer parses the input and renders each table as a node with its columns listed inside. Foreign key relationships become labelled edges connecting the related tables.
Read-Only Viewer
Schema Visualizer is a read-only tool. To edit the schema and regenerate ORM code, use FlowORM Mapper, which supports the same DDL import but adds a full editing canvas.
Pan & Zoom
Navigate large schemas with mouse pan (click and drag the canvas) and scroll-wheel zoom. Pinch-to-zoom works on touchpad and touchscreen.
Toggle Column Visibility
Hide columns in a table node to reduce noise. Click the collapse button on a table node to show only its name and relationship connectors.
Relation Highlighting
Click a table node to highlight all its direct relationships. Unrelated tables are dimmed so you can focus on the selected table's neighbourhood.
Export Diagram
Export the current view as PNG, SVG, or a re-importable JSON schema file. PNG and SVG exports capture the current zoom level and visible area.
Connecting a Database
If you have access to a database server from the machine running TotalApp, you can pull the schema directly.
- Click Import → Connect Database in the toolbar.
- Select your database type: PostgreSQL, MySQL, SQLite, or SQL Server.
- Enter the connection string or individual host/port/database/user/password fields.
- Click Fetch Schema. TotalApp queries the information schema and extracts all table and foreign key definitions.
- The diagram renders automatically. Close the connection dialog — no live connection is maintained after the fetch.
Credentials Are Not Stored
Database connection details entered in the Connect dialog are used once to fetch the schema and then discarded. They are never saved to disk or sent to TotalApp servers. Use a read-only database user when connecting.
Pasting DDL
The fastest way to visualize a schema without a database connection is to paste DDL text directly.
- Click Import → Paste DDL in the toolbar. A text area appears.
- Paste your
CREATE TABLEstatements. Multiple tables can be pasted at once. - Click Visualize. The diagram renders within seconds.
Exporting DDL from Popular Databases
PostgreSQL: pg_dump --schema-only -t tablename mydb
MySQL: mysqldump --no-data mydb
SQLite: .schema command in the SQLite CLI
SQL Server: Right-click database → Tasks → Generate Scripts in SSMS
Reading the Diagram
Each element in the diagram has a specific visual meaning.
- Table nodes — rectangles with the table name as a header. Column names, types, and flags (PK, FK, UNIQUE, NOT NULL) are listed inside.
- Primary key columns — shown with a key icon (🔑) and bold text.
- Foreign key columns — shown with a link icon and italicised text. The relationship edge connects this column to the referenced table's primary key.
- Relationship edges — lines connecting foreign key columns to primary key columns. The label shows the constraint name. Crow's foot notation indicates cardinality (one / many).
- Dashed edges — optional (nullable) foreign keys. Solid edges are required (NOT NULL) foreign keys.
Search Tables
Use the search box in the top toolbar to filter tables by name. Matching tables are highlighted; non-matching tables are dimmed. Press Escape to clear the search.
Export
- PNG — Exports the entire diagram at the current zoom level with a white background. Good for documentation and wiki pages.
- SVG — Scalable vector export. Text and shapes remain crisp at any zoom level in presentations or PDF documents.
- JSON Schema — Exports the parsed schema as a structured JSON object that can be re-imported into the Visualizer, FlowORM Mapper, or used by scripts to generate code.
Tips
- Use Auto-Layout (toolbar button) to re-arrange tables into a clean force-directed layout when the diagram becomes cluttered after import.
- Double-click the canvas background to fit all tables into the visible viewport.
- Right-click a table node for a context menu: Copy CREATE TABLE, Collapse All Columns, Focus Neighbourhood.
- Drag table nodes to reposition them. The layout is not saved unless you export the JSON schema.
- Use the Minimap (bottom-right) to navigate large schemas with many tables.
AI Assistant
Open the built-in AI Assistant from the tab on the right edge of the screen to get help with your diagram. The assistant sees the source format (TotalApp JSON, Prisma schema, or SQL DDL), the active tab's name, and the full parsed entity/column/relation graph, so you can ask things like:
- "Summarize this entity-relationship diagram"
- "Do you see any modeling issues in this schema?"
- "Should any of these entities be normalized further?"
- "What's the difference between the Prisma and SQL DDL import formats?"
The assistant does not have a live database connection — it reasons over the entities, columns, and relations currently rendered in the diagram.
FAQ
FOREIGN KEY or REFERENCES constraints in the DDL. Implicit relationships (e.g. columns named user_id without a REFERENCES clause) are not auto-detected. Add the constraint to the DDL or use FlowORM Mapper to draw the relationship manually.CREATE VIEW and CREATE MATERIALIZED VIEW statements are parsed and rendered as table nodes with a "View" badge. They appear in the diagram and can have relationship edges if the view definition includes foreign key references.