Database Tools
Visual database management — ORM mapping, SQL formatting, schema visualization, query building, and seed data generation.
What's Included
TotalApp's Database Tools mode gives you a complete visual environment for working with your data layer. Whether you are designing a schema, writing queries, generating test data, or mapping entities to an ORM, all the tools are in one place. Activate Database Tools mode from the mode switcher in the top header.
No Database Connection Required
All Database Tools run entirely in-browser with no external database connection needed. The tools help you design, format, and visualize your schema and queries before running them against a real database. Copy the generated SQL or ORM code directly into your project.
FlowORM Mapper
Visual entity-relationship designer that generates TypeScript ORM code (TypeORM, Prisma, Sequelize). Drag entities onto the canvas, define fields and relations, then export ready-to-use model files.
SQL Formatter
Paste any SQL query and get it back clean — formatted with consistent indentation, keyword casing, and clause alignment. Supports SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, and complex CTEs.
Schema Visualizer
Import a SQL DDL script or paste CREATE TABLE statements and see an interactive entity-relationship diagram. Tables appear as nodes; foreign-key relationships become labelled edges.
Visual Query Builder
Build SELECT queries without writing SQL by hand. Choose tables, pick columns, add WHERE filters, set ORDER BY and LIMIT clauses — the tool outputs a formatted SQL statement you can copy and run.
Seed Data Generator
Generate realistic mock data for any table structure. Define column types (name, email, date, UUID, enum, etc.) and the generator produces INSERT statements or JSON arrays ready for seeding.
Quick Start
- Open TotalApp and click the mode switcher in the top header.
- Select Database from the mode list — the sidebar switches to Database Tools navigation.
- Click FlowORM Mapper to start designing your data model visually, or go straight to SQL Formatter if you already have SQL to clean up.
- Use Schema Visualizer to import an existing DDL and understand the table relationships at a glance.
- Once your schema is defined, use Seed Data Generator to create INSERT statements for testing.
Workflow Tip
A common workflow is: Schema Visualizer (understand existing structure) → FlowORM Mapper (design models) → Visual Query Builder (write queries) → Seed Data Generator (populate test data). You don't have to follow this order — each tool works independently.
Screen Reference
FlowORM Mapper
Visual canvas for designing entity models and exporting ORM code. Drag to add entities, double-click to add fields, draw lines between entities to create relationships. Supports TypeORM, Prisma, and Sequelize output.
SQL Formatter
Paste raw SQL into the left panel and the right panel shows the formatted result in real time. Choose your preferred indentation style (2 spaces, 4 spaces, tabs) and keyword case (UPPER, lower, Title). Copy the result with one click.
Schema Visualizer
Paste CREATE TABLE SQL or import a .sql file. The visualizer parses the DDL and renders an interactive diagram. Pan and zoom to explore large schemas. Click a table node to highlight its direct relations.
Visual Query Builder
Select a table from the dropdown, then check the columns you want to include. Add filter rows with column, operator, and value fields. Set ORDER BY and LIMIT. The generated SQL updates live as you build.
Seed Data Generator
Define a table name and its columns, then set a data type for each column (firstName, lastName, email, uuid, integer, date, enum, etc.). Choose row count (1–10 000) and output format (SQL INSERT or JSON array). Download the result as a file.
FlowORM Mapper — Supported Targets
The ORM Mapper generates code for three popular Node.js ORMs. Switch the target using the dropdown in the toolbar — the code panel updates immediately without redrawing the canvas.
| ORM Target | Output Format | Notes |
|---|---|---|
| TypeORM | TypeScript decorators (@Entity, @Column) | Generates entity classes with full decorator metadata |
| Prisma | Prisma Schema Language (model blocks) | Generates schema.prisma definitions including relations |
| Sequelize | TypeScript model definitions | Generates DataTypes model files with associations |
Connection Pool Inspector
The FlowORM Mapper also includes a Connection Pool panel where you can define connection strings for multiple databases. These are stored locally and used to preview live schema information when a real database is accessible.
Seed Data Generator — Column Types
The following data types are available when defining columns in the Seed Data Generator:
| Type | Example Output |
|---|---|
| uuid | 550e8400-e29b-41d4-a716-446655440000 |
| firstName | Alice |
| lastName | Johnson |
alice.johnson@example.com | |
| phone | +1-555-0132 |
| date | 2024-03-15 |
| timestamp | 2024-03-15T09:41:00Z |
| integer | 42 |
| decimal | 19.95 |
| boolean | true |
| enum | One of a custom list you provide |
| text | A short lorem-ipsum sentence |
| url | https://example.com/path |
| country | Germany |
| city | Istanbul |
FAQ
pg_dump --schema-only), then paste it in.ON CONFLICT DO UPDATE) are preserved as-is and formatted around their surrounding clauses.