TotalApp Docs

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

  1. Open TotalApp and click the mode switcher in the top header.
  2. Select Database from the mode list — the sidebar switches to Database Tools navigation.
  3. Click FlowORM Mapper to start designing your data model visually, or go straight to SQL Formatter if you already have SQL to clean up.
  4. Use Schema Visualizer to import an existing DDL and understand the table relationships at a glance.
  5. 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
TypeORMTypeScript decorators (@Entity, @Column)Generates entity classes with full decorator metadata
PrismaPrisma Schema Language (model blocks)Generates schema.prisma definitions including relations
SequelizeTypeScript model definitionsGenerates 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
uuid550e8400-e29b-41d4-a716-446655440000
firstNameAlice
lastNameJohnson
emailalice.johnson@example.com
phone+1-555-0132
date2024-03-15
timestamp2024-03-15T09:41:00Z
integer42
decimal19.95
booleantrue
enumOne of a custom list you provide
textA short lorem-ipsum sentence
urlhttps://example.com/path
countryGermany
cityIstanbul

FAQ

Does the Schema Visualizer connect to a live database?
No. The Schema Visualizer only reads SQL DDL text that you paste or upload. It does not make any network connections. To visualize a live database schema, export the DDL from your database client first (e.g. pg_dump --schema-only), then paste it in.
Can I export the FlowORM Mapper canvas as an image?
Yes. The Export button in the FlowORM Mapper toolbar offers three formats: PNG (transparent background), SVG (scalable vector), and JSON (re-importable canvas state). The JSON export preserves entity positions and lets you pick up where you left off.
What SQL dialects does the SQL Formatter support?
The SQL Formatter handles standard ANSI SQL and is compatible with PostgreSQL, MySQL, SQLite, and SQL Server syntax. Dialect-specific extensions (e.g. PostgreSQL's ON CONFLICT DO UPDATE) are preserved as-is and formatted around their surrounding clauses.
Is my data sent to any server?
No. All Database Tools run entirely in your browser. SQL text, schema definitions, seed configurations, and generated output never leave your machine. Nothing is transmitted to TotalApp servers.
How many rows can the Seed Data Generator produce?
Up to 10 000 rows per generation. For larger datasets, generate in batches and concatenate the output files. Very large INSERT files (above ~5 000 rows) are more efficiently handled by downloading as a .sql file rather than copying from the clipboard.