Design and Manage H2 Databases with DbSchema

Build a clearer workflow for H2: reverse engineer existing schemas into interactive ER diagrams, model changes visually, and generate reviewed SQL scripts before deployment.

DbSchema is built for visual modeling, schema documentation, and deployment. Keep an offline model in Git, collaborate across teams, and publish documentation that developers, analysts, and stakeholders can navigate in minutes.

DbSchema Database Designer

Download DbSchema See H2 Features Download H2 JDBC Driver

What happens after you download?

Get to your first H2 schema diagram in minutes. No account, no credit card.

1
Install in minutes

Download the installer for Windows, macOS, or Linux and launch DbSchema. No signup required.

2
Connect to H2 or open a sample

Reverse engineer an existing H2 database or open a sample model to explore tables, relationships, and indexes.

3
Design, document, and deploy

Edit schema visually, generate documentation, and prepare reviewed migration scripts for safer releases.

H2 is a pure-Java relational database that runs in-process, making it the default embedded database in Spring Boot and a mainstay of Java integration test suites. Because H2 databases often exist only during a test run or are bundled inside an application JAR, schema design and verification are typically done programmatically. DbSchema provides a visual alternative: connect to an H2 file, in-memory, or server-mode database and use a graphical table editor instead of writing DDL by hand.

Design H2 Schemas Without a Running Application

DbSchema can open an H2 file-based database directly, without requiring the owning application to be active. This disconnected mode lets you inspect and modify the schema of a test database between runs — useful when debugging a Flyway migration or verifying the table structure produced by Hibernate auto-DDL.

Download DbSchema Free See H2 Features

DbSchema opening an H2 file database in disconnected mode

Edit Tables with a Visual Editor

Add, rename, or drop columns, change data types, set default values, and define foreign key relationships using the table editor. Changes are previewed as DDL before being applied to the H2 database — no need to write ALTER TABLE statements manually for iterative schema work.

Table editor modifying column definitions in an H2 schema

Populate Test Databases with Generated Data

H2 databases used as test fixtures need realistic data to exercise business logic thoroughly. DbSchema's data generator fills tables with configurable synthetic values — names, email addresses, dates, numeric ranges, and foreign-key-aware references — so integration tests run against populated schemas rather than empty tables.

Data generator populating an H2 test database with synthetic rows

Connecting to H2

H2 supports three connection modes. For a file-based database, use jdbc:h2:~/test (relative to the user home directory) or an absolute path such as jdbc:h2:/data/mydb. For an in-memory database shared within the same JVM, use jdbc:h2:mem:testdb. For server mode, use jdbc:h2:tcp://host:9092/~/test after starting H2 with java -cp h2.jar org.h2.tools.Server -tcp. DbSchema bundles the H2 JDBC driver, so no separate driver download is required for any of these modes.

Why Use DbSchema with H2

  • Open H2 file databases without starting the owning Spring Boot application
  • Design schemas visually and export the resulting DDL for Flyway or Liquibase scripts
  • Populate test databases with realistic synthetic data for integration tests
  • Inspect the schema produced by Hibernate or JPA auto-DDL to catch structural issues early
  • Document H2 schemas shared across multiple microservices in a monorepo