Build a clearer workflow for TiDB: reverse engineer existing schemas into interactive ER diagrams, model changes visually, and generate reviewed SQL scripts before deployment.
DbSchema is built for fast schema design, query iteration, and safe MySQL-compatible deployments. Keep an offline model in Git, collaborate across teams, and publish documentation that developers, analysts, and stakeholders can navigate in minutes.
Download DbSchema See TiDB Features Download TiDB JDBC Driver
Get to your first TiDB schema diagram in minutes. No account, no credit card.
Download the installer for Windows, macOS, or Linux and launch DbSchema. No signup required.
Reverse engineer an existing TiDB database or open a sample model to explore tables, relationships, and indexes.
Edit schema visually, generate documentation, and prepare reviewed migration scripts for safer releases.
TiDB is a distributed Hybrid Transactional and Analytical Processing (HTAP) database developed by PingCAP. Its architecture separates compute (TiDB SQL layer) from storage, with TiKV providing row-oriented storage for OLTP workloads and TiFlash providing columnar replica storage for OLAP workloads. Both storage engines are kept consistent via the Raft consensus protocol, so analytical queries on TiFlash always read fresh, consistent data without the lag typically associated with ETL pipelines.
Download DbSchema Free See TiDB Features
TiDB exposes a MySQL-compatible SQL interface on port 4000 (note: not MySQL's standard port
3306). DbSchema connects via the MySQL Connector/J driver and reverse-engineers the full schema —
tables, views, indexes, and TiFlash replica definitions — into a visual diagram. Because TiDB handles automatic
sharding (called region splitting) transparently, the schema diagram looks identical to what you would see with
a single-node MySQL database, abstracting away the distributed internals.
TiDB is compatible with the MySQL 5.7 and 8.0 protocol and SQL syntax, which means standard MySQL queries — joins, subqueries, window functions, CTEs, full-text search — work without modification. DbSchema's SQL editor sends queries via MySQL Connector/J and returns results in the built-in grid. You can run both transactional OLTP queries against TiKV and analytical OLAP queries that TiDB automatically routes to TiFlash replicas, all from the same query tab.
TiDB-specific SQL hints such as /*+ READ_FROM_STORAGE(TIFLASH[table]) */ can be added directly in
the SQL editor to force columnar execution for analytical workloads, while EXPLAIN ANALYZE shows
the distributed query plan including which operators ran on TiKV versus TiFlash. This level of query plan
visibility helps you optimize hybrid workloads that mix row reads and aggregation-heavy analytics.
The DbSchema data explorer connects to TiDB and presents table data in a familiar row-by-row browsing interface. You can page through records, filter by column values, and inspect individual rows from any TiDB table regardless of whether that table has a TiFlash columnar replica enabled. This is useful for validating that TiFlash replication has converged after initially adding a replica to a large table.
TiDB Cloud, PingCAP's managed service, provides the same MySQL-compatible connection interface, so the same DbSchema connection profile works for both self-hosted TiDB clusters and TiDB Cloud Serverless or Dedicated tiers. The data explorer's CSV export makes it straightforward to pull samples from the columnar replica for comparison with expected analytical results.
Select MySQL as the database type in DbSchema. TiDB uses MySQL Connector/J (com.mysql.cj.jdbc.Driver),
which DbSchema includes by default. The JDBC URL format is:
jdbc:mysql://tidb-host:4000/mydb. The critical difference from a standard MySQL connection is the
port: TiDB listens on 4000 by default, not 3306. Entering the wrong port is the most
common connection error when setting up TiDB for the first time.
For TiDB Cloud connections, copy the connection string from the TiDB Cloud console. It will include the cluster
hostname, port 4000, and require SSL. Add ?useSSL=true&requireSSL=true to the
JDBC URL or configure SSL in the DbSchema connection dialog's advanced settings. The TiDB root user password is
set during cluster creation; there is no default empty password as there is with some local MySQL installations.
EXPLAIN ANALYZE easier to review in the results grid.