An embedded SQL database runs inside the application that uses it. That can remove a network dependency from an offline desktop app, an installation utility or a local data analysis pipeline. It also moves responsibility for storage, upgrades and recovery into the application. The right choice depends on who owns the database file and what that process does most often. Saving a small transaction every few seconds is a different workload from scanning several large Parquet files to build a report.
Choose the workload and the ownership model
Start with the operation you cannot afford to get wrong. An offline application must recover its latest valid state after interruption. An analytical tool must reproduce a result from the same inputs. A Java test suite must create and tear down its database in a controlled way. If many independent processes on different hosts need to write to one shared data store, consider a client/server design from the start. Several engines below have server options, but the ownership and failure modes change when you use them.
The quick difference
| Product | Best fit | Main strength | Watch for |
|---|---|---|---|
| SQLite | Durable local application data | Single-file storage and wide ecosystem support | Only one writer at a time for a database file |
| DuckDB | In-process analytical SQL | Scan and aggregate local datasets and files | Coordinate writes through a single native file owner in embedded mode |
| H2 | Java applications and disposable JDBC test databases | In-memory or persistent mode in a Java package | Compatibility modes do not replace tests on the production engine |
| HyperSQL | Java applications requiring JDBC and distinct storage modes | In-process memory and file options plus separate server modes | Plan explicitly for file lifecycle, backups and deployment mode |
| Firebird Embedded | Applications already using Firebird SQL or data files | Native engine can open a database directly in the client process | Package platform binaries and protect file access |
SQLite
SQLite fits when a product needs a durable local store without administering a separate database service. A photo catalog, for example, can keep image paths, tags, edits and album membership in relational tables while leaving image bytes in ordinary files. The application can use transactions to keep those related changes consistent. SQLite’s documentation also describes using a database as an application file format, useful when people need to move a complete document between installations.
The code and documentation distributed by the project are dedicated to the public domain, with an optional warranty of title for organizations that require one. The key runtime consideration is contention. SQLite supports many readers, with one writer at a time per file. Try representative transaction lengths and simultaneous activity from the UI and background tasks. Also exercise your backup procedure while the application is open. A database file and its associated runtime files can have a coordinated lifecycle, so a casual file copy is a poor recovery test.
DuckDB
DuckDB is designed for analytical SQL in an application or notebook. It is a good candidate when the expensive part is reading, filtering and joining data for a report. For example, a desktop inspection tool could scan selected columns from monthly Parquet exports and present grouped results without first loading everything into a remote warehouse. The team should test its typical input files, including incompatible column types or missing partitions, because repeatable ingestion matters more than a demonstration query.
DuckDB is MIT-licensed. The concurrency documentation distinguishes threads within one read-write process from multiple independently writing processes. The Quack remote protocol is a client/server path, and DuckLake with a PostgreSQL catalog is a separate architecture. Neither changes the need to design around file ownership for the embedded setup. Plan the query memory, temporary storage and behavior when a computation is interrupted. If the application also needs frequent small transactions, evaluate the transactional and analytical jobs on their own merits.
H2
H2 is a Java SQL database with JDBC, in-memory and disk-backed storage, and embedded and server modes. It is useful when a JVM program needs local relational state or a suite needs a disposable database per run. An in-memory database can keep tests quick to create and easy to reset. A disk-backed test adds coverage for the upgrade and reopening paths the packaged application will use. Verify that your connection pool and process lifecycle keep the chosen database open for exactly as long as intended.
The project is dual-licensed under MPL 2.0 and EPL 1.0. H2 documents compatibility modes for several other engines. Use those modes to reduce friction on ordinary SQL where they help, then run critical migrations and queries on the production database if it differs. Pay particular attention to data types, null handling, identifier casing and transaction behavior. A passing test against a compatibility mode gives evidence about that run, while a test on the real engine can reveal problems the compatibility mode does not model.
HyperSQL
HyperSQL, also called HSQLDB, is a Java relational engine. Its documentation describes operating inside the application process or as a separate server, with several catalog types. That can suit a Java tool which needs an in-memory catalog for a temporary transformation and a persistent file catalog for saved configurations. For a long-lived product, the operational question is whether a teammate can identify all files a catalog needs, shut it down correctly, and recover it after a failed upgrade.
The project publishes its BSD-style license terms. The cost of adoption is mainly integration and maintenance time, including validation of how your build redistributes the JDBC driver and how you move data between releases. Compare H2 and HyperSQL with the same schema, migrations and isolation-sensitive queries. Put the workload through a packaged build as well as a development checkout. A local engine that works inside the IDE can still fail to open files in a restricted installation directory.
Firebird Embedded
Firebird Embedded is worth considering when the software already uses Firebird databases or depends on the Firebird SQL dialect. The Firebird 5 guide describes embedded connections that use the engine in the client process to open the database file directly. That can be useful for an offline edition of an application that shares schema concepts with a server installation. Treat the transition between local and server modes as a deployment decision with separate tests for file ownership, authentication and backup.
Firebird publishes IPL and IDPL licensing information for the project. Check the packaging requirements of the selected release and operating system, including the engine and supporting native files. Test an installer on a machine without development tooling or a Firebird server. The embedded connection depends on local file access, so validate operating system permissions for the packaged application and make sure another local user cannot simply open a private database file.
How to make the choice
Run a small set of production-shaped tests on a clean machine. Include opening an existing file, upgrading an older schema, recovering after interruption and restoring a backup to a second installation. Measure file sizes and time spent waiting on other work using data with realistic cardinality and distribution. Test at least one boundary value for currency precision, timestamps or text encoding that matters to the product. If the team is still comparing ways to express the schema, see the database modeling tools comparison.
Document which process can write, how errors are exposed to the user and how data is exported if the engine changes. A local engine removes some infrastructure work and adds a file lifecycle that the software team needs to own.
Bottom line
Choose SQLite for many general-purpose local stores, DuckDB for analysis over files and tables, and H2 or HyperSQL when a JVM-native database fits the application. Consider Firebird Embedded when existing Firebird data or SQL makes continuity important. Use the same upgrade and restore scenario for each finalist so the decision accounts for the years after initial integration.
References
Official sources checked November 12, 2026.
- Appropriate Uses For SQLite
- SQLite Copyright
- Concurrency – DuckDB
- Frequently Asked Questions – DuckDB
- h2database/h2/src/docsrc/html/features.html at master · h2database/h2database · GitHub
- License
- Chapter 1. Running and Using HyperSQL
- HyperSQL License
- Firebird 5 Quick Start Guide
- Firebird: Licensing
