Supported Databases
ChartDB supports the following database systems:PostgreSQL
Open-source relational database with advanced features
MySQL
Popular open-source relational database
SQL Server
Microsoft’s enterprise database platform
MariaDB
MySQL-compatible open-source database
SQLite
Lightweight embedded database
ClickHouse
Column-oriented analytics database
CockroachDB
Distributed PostgreSQL-compatible database
Oracle
Enterprise-grade relational database
Import Methods
Smart Query Import
The Smart Query is a specially crafted SQL query that extracts complete schema metadata from your database in a single execution. Each database type has its own optimized Smart Query.The Smart Query retrieves:
- Tables and views
- Columns with data types, nullability, and defaults
- Primary keys and foreign keys
- Indexes
- Check constraints
- Custom types (enums, composite types)
- Database metadata and version information
SQL Script Import
Import existing SQL DDL scripts (CREATE TABLE statements) to generate diagrams. ChartDB’s SQL parser supports:- CREATE TABLE statements
- Foreign key relationships (FOREIGN KEY, REFERENCES)
- Primary keys and unique constraints
- Check constraints
- Indexes
- Custom types (PostgreSQL enums, composite types)
- Views
- Multi-schema support
Export Capabilities
SQL Export
Export your diagrams to executable SQL scripts for:- PostgreSQL: Full support including schemas, enums, composite types, arrays, and sequences
- MySQL: Optimized for MySQL syntax with AUTO_INCREMENT and table comments
- SQL Server: T-SQL compatible scripts
- SQLite: Lightweight schema creation
ChartDB automatically handles database-specific syntax differences when exporting, including:
- Data type mappings
- Identifier quoting (backticks, double quotes)
- Auto-increment syntax
- Default value formatting
- Schema/database qualifiers
Cross-Database Export
ChartDB supports cross-dialect export, allowing you to design in one database type and export to another. The system automatically:- Maps data types between databases
- Converts syntax differences
- Handles unsupported features with warnings
- Preserves as much schema information as possible
Database-Specific Features
PostgreSQL Family
PostgreSQL
PostgreSQL
- Full enum and composite type support
- Array columns
- Sequences and serial types
- Multi-schema support
- Supabase and TimescaleDB editions
CockroachDB
CockroachDB
- PostgreSQL-compatible syntax
- Distributed architecture awareness
- System schema filtering
MySQL Family
MySQL
MySQL
- Storage engines (InnoDB, MyISAM)
- AUTO_INCREMENT support
- Table and column comments
- Multiple versions (5.7, 8.0+)
MariaDB
MariaDB
- MySQL-compatible syntax
- Enhanced GROUP_CONCAT support
- InnoDB statistics
Enterprise Databases
SQL Server
SQL Server
- Multi-schema support
- Identity columns
- Version support (2016-, 2017+)
- JSON_QUERY for metadata
Oracle
Oracle
- Schema-qualified objects
- JSON_OBJECT for metadata
- Current schema context
Specialized Databases
ClickHouse
ClickHouse
- Column-oriented storage
- MergeTree engines
- Materialized views
- Primary key indexing
SQLite
SQLite
- Schema-less design
- PRAGMA-based metadata
- Cloudflare D1 support
- Embedded database features
Getting Started
- Choose your database from the supported list
- Import your schema using Smart Query or SQL script
- Design and visualize your database structure
- Export to SQL for implementation
Next Steps
Select your database type to learn about specific Smart Queries, import methods, and features.
