Design and Manage PlanetScale Databases Visually with DbSchema

DbSchema lets you design, manage, and document PlanetScale databases. Create ER diagrams, define tables and columns, and generate SQL scripts - with or without a live database connection.

Use Git to share the design, compare it with the PlanetScale database, and deploy changes. DbSchema also includes a data editor, query builder, and HTML5 documentation - everything you need in one tool.

DbSchema Database Designer

Download DbSchema Download PlanetScale JDBC Driver

PlanetScale's Vitess Architecture and Database Branching

PlanetScale is a serverless MySQL-compatible database built on Vitess, the sharding middleware originally developed at YouTube to scale MySQL horizontally. Under the hood, Vitess manages keyspaces and shards transparently, so applications interact with standard MySQL SQL while PlanetScale handles horizontal scaling automatically. Its most developer-friendly feature is database branching: each branch gets its own isolated schema and its own set of connection credentials, enabling safe schema iteration without risking production data.

DbSchema connects to any PlanetScale branch using the MySQL JDBC driver and the branch-specific connection string provided in the PlanetScale dashboard. The visual schema diagram reflects exactly what is deployed on that branch, letting you review table relationships, index coverage, and column types before submitting a deploy request — the PlanetScale equivalent of a pull request for schema changes.

PlanetScale branch schema visualized as an entity-relationship diagram in DbSchema

Writing MySQL-Compatible SQL Against PlanetScale Branches

PlanetScale exposes a MySQL-compatible SQL interface, so standard MySQL DDL and DML statements work as expected. DbSchema's SQL editor connects through the MySQL Connector/J driver and lets you execute SELECT, INSERT, UPDATE, and DELETE statements directly against any branch. You can also run EXPLAIN to review query plans and ensure that indexes are being utilized correctly before the schema change ships to production.

PlanetScale enforces foreign key constraints differently from standard MySQL — it allows you to define them for documentation purposes but disables runtime enforcement to avoid distributed transaction issues in a sharded environment. DbSchema's diagram still renders these logical relationships visually, giving your team a clear picture of the intended referential integrity even when enforcement is deferred to the application layer.

Writing MySQL-compatible SQL against a PlanetScale branch in DbSchema

Exploring Table Data Across PlanetScale Branches

The DbSchema data explorer lets you browse table contents for any PlanetScale branch without writing SQL. You can page through rows, filter by column values, and inspect individual records to verify that seed data or test fixtures were loaded correctly on a development branch. This is especially useful when a feature branch contains a data migration and you need to confirm the transformation produced the expected results.

Because each branch has independent connection credentials, you can save separate DbSchema connection profiles for your main, staging, and development branches. Switching between them takes a single click, letting you compare data across branches quickly. The export-to-CSV feature in the explorer is handy for capturing a snapshot of branch data to share with stakeholders or use as a test fixture in another environment.

Browsing PlanetScale branch table data in the DbSchema data explorer

Connecting DbSchema to PlanetScale

Select MySQL as the database type in DbSchema. PlanetScale provides a connection string in the dashboard for each branch; the JDBC URL format is: jdbc:mysql://aws.connect.psdb.cloud/mydb. Each branch has a unique username and password — copy these from the PlanetScale dashboard's "Connect" panel and paste them into the DbSchema connection dialog. The driver class is com.mysql.cj.jdbc.Driver, included with DbSchema by default.

PlanetScale requires SSL for all connections. Add ?sslMode=VERIFY_IDENTITY (or ?useSSL=true&requireSSL=true for older driver versions) to the connection URL if DbSchema does not enable SSL automatically. The default MySQL port 3306 is used. Because PlanetScale's branching model means every branch has a unique credential set, it is good practice to name your DbSchema connection profiles after the branch they target (e.g., "PlanetScale — main", "PlanetScale — feature/add-payments").

Why Teams Use DbSchema with PlanetScale

  • Provides a visual schema diagram for each branch, making deploy request reviews faster and more accurate.
  • Lets developers query branch data through a GUI, avoiding the need to configure a local MySQL client for every branch.
  • Renders logical foreign key relationships visually even though PlanetScale disables runtime FK enforcement.
  • Simplifies management of multiple branch connection profiles in one central tool.
  • Generates offline schema documentation useful for architecture handoffs and compliance audits.
  • Enables non-DBA team members to explore and understand the database structure without writing SQL.