How to use Modej
Modej turns legacy databases and source code into living documentation, navigable diagrams and professional reports. This guide walks you from your first import to the most advanced features.
Welcome
Modej takes your database (Firebird, MySQL, PostgreSQL, Oracle, SQL Server, and others) together — optionally — with the source code that uses it, and gives you back:
- an interactive ER schema with all tables, columns, keys and relationships;
- a map of which parts of the code use which tables (and how: read, write, modify);
- automatic documentation generated by artificial intelligence;
- professional PDF reports ready to hand to a client or colleague.
First 5 minutes
Import your database
Go to , choose "New project", give it a name, select the database type and upload the DDL file (your database’s SQL schema).
Explore the ER Schema
Right after the import, click "Schema DB" to see all your tables drawn as a diagram, with relationships already connected automatically.
Try AI Analysis
If you’ve also uploaded the source code, go to and let the AI explain what your code does.
Generate your first report
Go to and generate a complete PDF in a few clicks — perfect to show a client or keep as documentation.
Importing a Database
Modej reads the DDL - the SQL script describing the database structure (tables, columns, keys, indexes, triggers, stored procedures). You never need a direct connection to your database: the text file with the schema is enough.
1 Server-based databases (Firebird, MySQL, PostgreSQL, SQL Server, Oracle, Sybase, DB2, SQLite)
For these databases you have two options:
If you already have access to your DB with a client (e.g. DBeaver, pgAdmin, SQL Developer), export the schema in SQL format ("structure only", no data) and upload that file directly to .
Modej provides ready-made .bat scripts that automatically extract the DDL
by connecting to your database with the credentials you enter (never saved, used
only for local extraction):
| Database | Script | Tool used |
|---|---|---|
| Firebird / InterBase | extract_ddl_firebird.bat | isql -x |
| MySQL / MariaDB | extract_ddl_mysql.bat | mysqldump --no-data |
| PostgreSQL | extract_ddl_postgres.bat | pg_dump --schema-only |
| SQL Server | extract_ddl_mssql.bat | sqlcmd |
| Oracle | extract_ddl_oracle.bat | expdp / sqlplus |
| Sybase / SAP ASE | extract_ddl_sybase.bat | ddlgen |
| IBM DB2 | extract_ddl_db2.bat | db2look -e -a |
| SQLite | extract_ddl_sqlite.bat | sqlite3 .schema |
Double-click the right script, enter the server/credentials when prompted,
and you'll find the ready-to-upload .sql file in the same folder.
2 Uploading to Modej
Go to Import DB/Code
Choose "New project" or select an existing project to add a new version.
Select the DB type
Choose the right type from the dropdown - Modej automatically normalises the syntax specific to each database.
Upload the .sql file
Drag the file into the dropzone or select it. Modej automatically detects tables, columns, primary keys, foreign keys, triggers, stored procedures, views and indexes.
Scripts for Legacy DBs (Access, dBase, Paradox)
Access, dBase and Paradox don’t have a text DDL you can export directly — they are file-based, binary databases. For these you need a conversion script that runs on the computer where the database file lives, before uploading it to Modej.
Script: Avvia_Access_Export.bat + Modej_Access_Export.ps1
Requirement: Microsoft Access or Access Runtime installed (free, downloadable from Microsoft if you don’t have full Office).
- Double-click
Avvia_Access_Export.bat - Select the
.mdbor.accdbfile when prompted - The script reads the native structure via ADOX and generates the SQL file in the same folder
Script: Avvia_DBase_Export.bat + Modej_DBase_Export.ps1
Requirement: none — the parser is built into the script.
- Double-click
Avvia_DBase_Export.bat - Select the folder containing the
.dbffiles (each file is a separate table) - The script reads the binary header of each file and generates a single SQL file with all the tables
Script: Avvia_Paradox_Export.bat + Modej_Paradox_Export.ps1
Requirement: none for Paradox 3-5. For Paradox 7+ install "Microsoft Access Database Engine 2010" (free).
- Double-click
Avvia_Paradox_Export.bat - Select the folder with the
.dbfiles - The script tries ODBC first, then falls back to a binary parser if needed
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned. The provided
.bat files bypass this restriction in most cases anyway.
Importing Source Code
Uploading your source code too (Delphi, C#, Java, PHP...) lets Modej understand which parts of the application use which tables — the basis for AI Analysis, Code↔DB, Process Map and full Technical Reports.
1 How to generate the map file
The file to upload is a .txt generated by an extraction script that
runs at the client site, against the real source code. The expected format is:
file.pas | UnitName | ClassName | SQL_STRING:SELECT * FROM TABLE WHERE...
Each line represents a relationship between a code unit and a database operation.
2 Upload
Go to Import DB/Code
If you already have a project, select it; otherwise create a new one.
Upload the .txt map file
Modej automatically validates the file: checks it’s text (not binary/ZIP), fixes the encoding if needed, verifies the format.
Check the result
You’ll see the count of units, methods and code↔DB relationships found. From here you can go straight to "Code ↔ DB".
ER Schema
Every table becomes a draggable card with all its columns, primary keys (PK) and foreign keys (FK) highlighted. Relationships are drawn automatically: indigo lines for real FKs declared in the database, orange lines for the manual FKs you add.
1 Navigation
- Drag cards to rearrange the layout — positions save automatically;
- Double-click a table to open the "Functional Details" panel with columns, triggers, stored procedures, views and indexes;
- Use the search at the top to jump straight to a table;
- "FK only" filter to hide tables with no relationships and focus on the core structure;
- Zoom with the
−/+buttons at the bottom right.
Colours and Areas
Group tables into coloured "areas" (e.g. Warehouse, Sales, Accounting) by dragging each table onto its area in the left sidebar. These colours show up everywhere: ER Schema, Glossary, Technical Report.
- Create new areas with a custom name and colour;
- Filter by "Assigned" / "Unassigned" to quickly complete the classification;
- Inherit colours from a previous version of the same database, if you’re updating an already classified schema.
Manual FKs
Many legacy databases don’t declare all relationships at the SQL level — the relationship exists only "in the developers’ heads" or in application code. Manual FKs let you document them explicitly, and they show up in the ER Schema as dashed orange lines.
Select the source table and column, then the target table and column, add an optional note and save.
AI Analysis
Upload a ZIP of the source code: Modej analyses it with AI algorithms and generates reports on 4 different fronts, selectable at the start:
General overview: architecture, patterns used, code quality, general improvement suggestions.
Professional security audit: OWASP Top 10 vulnerabilities, SQL injection, severity classification for every issue found, with corrected code ready to copy.
N+1 queries, inefficient loops, blocking operations, missing indexes — with impact estimate and optimised solution.
Refactoring suggestions to modernise legacy code by applying more modern patterns.
Deep Analysis
Unlike AI Analysis (which gives a general overview), Deep Analysis examines every single file in the project, works out which business process it belongs to (e.g. "Order Management", "Customer Records") and automatically proposes a process map ready to apply.
When it’s done, click "Apply to Processes" to transfer the classification directly into the Process Map, saving the manual work of dragging.
AnalisiDB — Deep Diagnosis Plus
Unlike AI Analysis (which looks at the code), AnalisiDB is deterministic — it doesn’t use AI: it applies fixed rules to keys, foreign keys, data types, naming, indexes and the normalisation level of the imported schema.
- An overall grade and an OK / Normal / Poor badge for the whole database;
- every issue found is grouped by table, with severity and a plain-language explanation;
- a corrective SQL script ready to copy — review and adapt it before running it, don’t fire it blindly at a production database.
Code ↔ DB
For every imported code unit you see the list of tables it uses, with the operation type (SELECT, INSERT, UPDATE, DELETE, or "mixed" if it does more than one) and the exact method name. The statistics at the top summarise the overall picture: total relationships, how many SELECT/INSERT/UPDATE/DELETE, tables and units involved.
With the Query Extraction Plus you can export this whole matrix to CSV, JSON or SQL — useful for documentation, audits or migrations.
Process Map
Create processes (e.g. "Invoicing") and sub-processes (e.g. "Issue Invoice"), then drag the still-unassigned code units from the left column into the right sub-process. Alternatively use "Analyse with AI" to have the entire structure proposed automatically based on the unit names.
Remember to click Save after every change — a green toast confirms the save succeeded.
Flow Diagram
Once the Process Map is populated, this page automatically generates an SVG diagram with the full hierarchy: processes at the top, sub-processes below them, and the code units assigned to each at the bottom.
Useful for a quick overview, or to export as an image for documentation.
DB Management Plus
See all imported versions for each database, with table count, import date and size. Rename a DB by double-clicking its name, delete outdated versions (if there’s more than one), or jump straight to the ER Schema or Comparison of each version.
Version Comparison Plus
Select a base version and a new version: you’ll see added tables (green), removed (red) and modified (orange) tables in a dual-view panel. Click a modified table to see exactly which columns changed, with the before/after type detail.
History / Changelog Plus
Similar to Version Comparison, but built for documentation: generates a changelog
in "release notes" style with a visual timeline, exportable to .md to insert
directly into the project’s Git repository.
Unused Tables Plus
Compares the database tables with those actually referenced in the imported code. "Unused" tables are likely legacy or obsolete — ideal candidates for cleanup before a migration, grouped by area with a percentage of the total.
Usage Heatmap Plus
List ranked from most to least used table, with coloured bars (blue=rare, green=moderate, orange=frequent, red=critical) and badges by operation type. Filter by SELECT/INSERT/UPDATE/DELETE for targeted analysis (e.g. DELETE only for a security audit).
Data Glossary Plus
For each table, write (or generate with AI) a description in business language, not technical — useful for anyone who needs to understand the database without being a developer. The "AI generate all" button automatically fills in every table still missing a description. Exportable to PDF.
Query Extraction Plus
Download all unit↔table relationships in CSV (for Excel), JSON (for other tools) or SQL (for direct queries). Perfect for technical documentation or to feed external analysis tools.
Full Technical Report Plus
A 20-30 page PDF generated entirely in your browser (no data leaves your computer during generation), ready to hand to a client or archive:
| Section | Content |
|---|---|
| Cover | Logo, project/database name, key info |
| Executive Summary | Complexity score, 6 KPIs, automatic alerts |
| ER Schema | Tables by area, orphan table indicator |
| Data Glossary | Business descriptions by area |
| Code→DB Analysis | Top 20 heatmap, orphan list |
| Process Map | Process → sub-process → unit hierarchy |
| Manual FKs | Full relationships table |
| Technical Appendix | Every table with all columns and types |
Complexity Index Plus
Score from 0 to 100 calculated from the number of tables, manual FKs, average columns per table and a penalty for orphan tables above 20%. You also see the trend over time: if you’ve imported multiple versions of the same database, a chart shows whether the system is becoming more or less complex from version to version.
Presentation Mode Plus
Turns the project data into fullscreen slides: cover, overview with 7 metrics (tables, columns, FKs, triggers, stored procedures, views, indexes), interactive ER schema, one slide per business process with its sub-processes and units, heatmap, and a final slide.
Navigate with the ← → arrow keys, exit with ESC. Perfect for client meetings or live demos.
Plus Marketplace
Each Plus is purchased separately and is valid for 12 months from purchase. The catalogue below is read live from the marketplace, so it always matches what you actually find on the page — names, prices and descriptions stay in Italian regardless of this guide’s language, for now.
Analisi
Analisi AI
Codice DB
Compliance
Migrazione
Report
Schema DB
Storage
Team
Features with a 🕐 Coming soon badge are on the way: advanced security audit, code version comparison, automatic documentation, dependency graph and more — the catalogue expands regularly.
Light/Dark Theme
The ☀/🌙 button at the top right of the main menu switches between dark and light theme. The preference saves automatically and applies to every page, including the ER Schema which lives in a separate panel — no need to set it twice.
Interface Language
Italian, English, Portuguese, Spanish, German, French and Kinyarwanda. Each user picks their own language from the selector in the main menu, independently of the other users on the same account — everyone sees Modej in the language they prefer.
AI-generated content (glossary, reports, descriptions) is created directly in the chosen language. This guide also follows the same language set in the menu.
Privacy and Security
- Passwords, API keys and credentials in the code are automatically masked before any submission to the AI;
- Source code is not kept on the servers after the analysis;
- DDL extraction scripts for legacy databases run locally on your computer — no credential is ever sent to Modej;
- See the Terms of Service and Privacy Policy for full details.
Team Roles
The account Owner can invite other users and assign each one of the three internal roles. Permissions are also checked server-side, not just by hiding buttons in the interface.
| Role | Can do |
|---|---|
| Owner | Everything, including inviting/removing users and purchasing Plus |
| Editor | Import, create and edit data — cannot delete projects or databases |
| Viewer | Read-only: can browse schemas, reports and analyses already done |
From the Owner sees all users, their status (active/disabled) and last access.
Requesting a Refund
The base subscription (Monthly or Annual plan) is refundable within 14 days of purchase: just open a request from your profile, optionally state the reason, and the Modej team reviews it — once approved, the refund arrives via Stripe within 5-10 business days to the same payment method.
Deleting Projects
Permanently deletes a project and all linked data — database, code, processes, manual FKs. For safety you’ll need to type the exact project name to confirm. The operation is irreversible and transaction-protected: if something goes wrong halfway through, nothing is deleted.
FAQ
Contact Support
Didn’t find what you were looking for? We’re here to help.
support@modej.eu