vs

H2 Database vs Lealone

H2 Database: Fast pure-Java SQL engine for embedded, in-memory and test databases, with compatibility modes. Lealone: Chinese Java OLTP database derived from H2, now repositioned as an AI agent platform built on its SQL engine.

key differences

  • Licensing: H2 Database is open source (copyleft) (MPL 2.0 or EPL 1.0 (dual)); Lealone is source-available (Server Side Public License v1 (H2-derived files under the H2 license)).
  • Lealone is built for larger datasets (≤ 10 TB) than H2 Database (≤ 100 GB).
  • Horizontal scaling is none in H2 Database and native in Lealone.
  • Only H2 Database has geospatial, json, triggers, stored procedures, compression.

choose h2 for

  • +Integration tests for Spring/JPA applications
  • +Embedded storage in Java desktop tools
  • +Prototyping before choosing a production database
  • +In-memory scratch databases in batch jobs

best at · Embedded, OLTP, Coordination

choose lealone for

  • +Embedded or standalone OLTP in Java applications
  • +Experimenting with SQL-defined services and LLM-generated apps
  • +Learning a modern rework of the H2 codebase

best at · OLTP, Embedded

overview
Primary model
Relational
Relational
Also supports
Spatial
Document
Type
Database engine
Database engine
Status
Active
Active
Developer
H2 Group (Thomas Mueller, Evgenij Ryazanov and contributors)
Lealone Database Group (zhh)
First release
2005
2013
Latest version
2.5.252 (Sep 24, 2026)
6.0.1 (Aug 18, 2024)
License
Open source (copyleft)MPL 2.0 or EPL 1.0 (dual)
Source-availableServer Side Public License v1 (H2-derived files under the H2 license)
Free tier
✓
✓
popularity
WhichDB Score
23.5
2.8
Rank
#128
#458
GitHub stars
4.6K
2.6K
Stack Overflow questions
5.1K
–
scale & guarantees
Comfortable data size
Small (≤ 100 GB)
Medium (≤ 10 TB)
Horizontal scaling
None
Native
Multi-region
None
None
ACID
Full
Full
Consistency
Strong
Strong
Schema
Strict
Strict
Architecture
Embedded, In memory, Client server, Single node
Embedded, Client server, Distributed
deployment
Self-hosted
✓
✓
Vendor-managed cloud
—
—
Serverless
—
—
Embedded
✓
✓
Edge
—
—
Clouds
–
–
capabilities
Transactions
✓
✓
Joins
✓
✓
Secondary indexes
✓
✓
Full-text search
✓
✓
Vector search
—
—
Geospatial
✓
—
JSON
✓
—
Change data capture
—
—
Triggers
✓
—
Stored procedures
✓
—
Materialized views
—
—
TTL / expiry
—
—
Pub/Sub
—
—
Columnar storage
—
—
In-memory
✓
✓
Durable persistence
✓
✓
Compression
✓
—
Encryption at rest
✓
—
Role-based access
✓
✓
Time travel
—
—
Branching
—
—
Online schema changes
—
—
Streaming ingest
—
—
Offline sync
—
—
Runs in WebAssembly
—
—
interfaces
Query languages
SQL
SQL
Client languages
Java
Java
Best for
Embedded, OLTP, Coordination
OLTP, Embedded

H2 Database vs Lealone: FAQ

What is the difference between H2 Database and Lealone?

H2 Database: Fast pure-Java SQL engine for embedded, in-memory and test databases, with compatibility modes. Lealone: Chinese Java OLTP database derived from H2, now repositioned as an AI agent platform built on its SQL engine. Licensing: H2 Database is open source (copyleft) (MPL 2.0 or EPL 1.0 (dual)); Lealone is source-available (Server Side Public License v1 (H2-derived files under the H2 license)). Lealone is built for larger datasets (≤ 10 TB) than H2 Database (≤ 100 GB). Horizontal scaling is none in H2 Database and native in Lealone.

When should I choose H2 Database over Lealone?

Choose H2 Database for integration tests for Spring/JPA applications, embedded storage in Java desktop tools and prototyping before choosing a production database. Choose Lealone for embedded or standalone OLTP in Java applications; experimenting with SQL-defined services and LLM-generated apps; and learning a modern rework of the H2 codebase.

Is H2 Database or Lealone more popular?

H2 Database ranks #128 on the WhichDB Score (23.5/100) and Lealone ranks #458 (2.8/100). Popularity is not fit: check the requirements that matter for your project.

Are H2 Database and Lealone open source?

Yes. H2 Database is open source. License: MPL 2.0 or EPL 1.0 (dual). Not in the OSI sense. Lealone is source-available: you can read the code, but the license restricts some uses, typically offering it as a competing managed service. License: Server Side Public License v1 (H2-derived files under the H2 license).