Visualize any existing schema
Already have a database? Reverse engineering lets you import SQL DDL or Prisma schemas and instantly create a visual diagram — so you can understand, edit, and extend your schema using the visual editor.
Reverse engineering is available on Pro and above. View plans.
SQL DDL import
You can import any standard SQL DDL file containing CREATE TABLE statements. Relmic parses the DDL, extracts tables, columns, types, constraints, and relationships, and generates a visual diagram automatically.
How to import SQL
- Open a project or create a new one.
- Click Import in the toolbar.
- Choose SQL DDL as the import format.
- Paste your SQL directly or upload a
.sqlfile. - Relmic parses the DDL and generates your diagram.
What gets imported
- Table names and column definitions
- Data types (mapped to the project's target DBMS)
- PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL constraints
- DEFAULT expressions
- Inline and named constraints
- Relationships inferred from foreign key declarations
Supported DBMS dialects
The SQL parser recognizes DDL from all 8 supported DBMS: PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, Oracle, BigQuery, and Redshift. If your DDL uses DBMS-specific syntax (e.g., PostgreSQL's SERIAL or SQL Server's IDENTITY), Relmic maps it to the correct visual representation.
Prisma schema import
If your project uses Prisma ORM, you can import your schema.prisma file directly. Relmic parses Prisma models, fields, attributes, and relations into a visual diagram.
How to import Prisma
- Click Import in the toolbar.
- Choose Prisma as the import format.
- Paste your Prisma schema or upload a
.prismafile. - Relmic converts the models into tables with proper types and relationships.
What gets imported
- Model names become table names
- Field types are mapped to SQL types for the target DBMS
- Attributes like
@id,@unique,@defaultbecome column constraints - Relations (
@relation) are drawn as foreign key relationships - Enums are preserved
Iterating on imported schemas
Once imported, your schema is a fully editable Relmic project. You can:
- Add, rename, or remove tables and columns
- Change data types and constraints
- Rearrange the layout with auto-layout algorithms
- Switch between view modes for different perspectives
- Re-export to any of the 12+ supported formats
This is a common workflow for modernizing legacy schemas: import the existing DDL, review it visually, make improvements, and export updated code. Combine with migration generation to safely evolve your production database.
Limitations
Reverse engineering focuses on schema structure. The following are not currently imported:
- Stored procedures, functions, and triggers
- Views and materialized views
- Custom DBMS-specific extensions or plugins
- Row-level data (only structure is imported)