DBeaver Support¶
DecentDB ships a JNI-backed JDBC driver that lets you connect to .ddb files directly from DBeaver — the popular open-source database tool. No network server is required; the driver opens the file in-process.
For JDBC driver details (URL format, properties, isolation mapping), see: JDBC Driver (Java).
Supported versions¶
| Component | Supported |
|---|---|
| DBeaver | 23.x+ (tested with Community Edition 25.3.x) |
| Java | 17 LTS, 21 LTS (must be Java 17+ at runtime) |
| Platforms | Linux x86_64, macOS x86_64/arm64, Windows x86_64 |
Installation¶
Option A — add the driver jar manually (recommended for now)¶
-
Build the driver jar and native library (or download a release):
-
Open DBeaver → Database → Driver Manager → New.
-
Fill in the driver form:
| Field | Value |
|---|---|
| Driver Name | DecentDB |
| Class Name | com.decentdb.jdbc.DecentDBDriver |
| URL Template | jdbc:decentdb:{file} |
| Default Port | (leave empty) |
| Category | SQL |
-
In the Libraries tab, click Add File and select the
decentdb-jdbc-*.jar. -
Add the JVM flag so the JNI library can be found:
- Go to DBeaver → Window → Preferences → Connections → Driver properties.
-
Or append to
Alternatively, placedbeaver.ini:libdecentdb_jni.so(andlibc_api.so) on the system library path (LD_LIBRARY_PATHon Linux,DYLD_LIBRARY_PATHon macOS). -
Click OK to save the driver.
Option B — DBeaver plugin (first-class database type)¶
The DecentDB DBeaver extension code lives in bindings/java/dbeaver-extension/ and registers DecentDB as a first-class database type inside DBeaver.
If you want to use the plugin today, build it from source:
Install location¶
You must install into the application plugins directory (not your workspace).
- Official DBeaver packages (tarball/Windows/macOS): typically
<DBeaver install>/plugins/ - Arch/Manjaro
extra/dbeaver:/usr/lib/dbeaver/plugins/
Install (official DBeaver packages)¶
Copy the built jar from bindings/java/dbeaver-extension/build/libs/ into DBeaver’s plugins/ directory, then restart DBeaver.
Install (Arch/Manjaro extra/dbeaver)¶
Arch’s DBeaver packaging uses Equinox “simpleconfigurator”, which means dropping a jar into plugins/ is not sufficient. You also need to add the bundle to bundles.info and start DBeaver once with -clean.
-
Copy the jar into the app plugin directory:
From the DecentDB repo root¶
VERSION=1.5.0
sudo install -Dm644 \ bindings/java/dbeaver-extension/build/libs/dbeaver-extension-${VERSION}.jar \ /usr/lib/dbeaver/plugins/org.jkiss.dbeaver.ext.decentdb_${VERSION}.jar
-
Add it to the bundle list:
BUNDLES_INFO=/usr/lib/dbeaver/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
Use an existing bundle to copy its (startLevel, autoStart) fields.¶
This prints e.g. "4,false" on many installs.¶
START_FIELDS=$(grep -m1 '^org.jkiss.dbeaver.ext.generic,' "$BUNDLES_INFO" | cut -d, -f4-5)
Append DecentDB bundle entry if it isn't already present.¶
if ! grep -qi '^org.jkiss.dbeaver.ext.decentdb,' "$BUNDLES_INFO"; then echo "org.jkiss.dbeaver.ext.decentdb,${VERSION},plugins/org.jkiss.dbeaver.ext.decentdb_${VERSION}.jar,${START_FIELDS}" | sudo tee -a "$BUNDLES_INFO" >/dev/null fi
-
Start DBeaver once with
-clean(forces it to rebuild its bundle cache):dbeaver -clean -consoleLog
After that, DecentDB should show up under New Connection → Embedded.
Creating a connection¶
- Database → New Database Connection → select DecentDB.
- Set the JDBC URL:
- Optional connection properties (add in the Driver Properties or Connection Properties tab):
| Property | Default | Description |
|---|---|---|
readOnly | false | Open the database in read-only mode |
busyTimeoutMs | 0 | Milliseconds to wait when the database is locked by another writer |
cachePages | 0 | Page cache size (0 = engine default) |
- Leave the Username and Password fields empty.
- Click Test Connection, then Finish.
URL examples¶
jdbc:decentdb:/home/alice/data/shop.ddb
jdbc:decentdb:/home/alice/data/shop.ddb?readOnly=true
jdbc:decentdb:/home/alice/data/shop.ddb?busyTimeoutMs=10000
jdbc:decentdb:/home/alice/data/shop.ddb?cachePages=2048
jdbc:decentdb::memory:
Basic usage¶
Once connected, you can:
- Run queries — open a SQL console (right-click connection → SQL Editor) and execute any supported SQL statement.
- Browse tables — expand the connection in the Database Navigator to see tables, columns, indexes, and foreign keys.
- View ER diagrams — right-click a schema or table → View Diagram to render the entity relationship diagram including FK relationships.
- Export data — right-click a table → Export Data to CSV, JSON, etc.
Manual smoke-test checklist¶
After installation, verify the following:
- [ ] Connect to a
.ddbfile — DBeaver shows the connection as connected. - [ ] Open a SQL console and run
SELECT 1— returns a result row with value1. - [ ] Run
CREATE TABLE t (id INTEGER PRIMARY KEY, name TEXT)— statement succeeds. - [ ] Run
INSERT INTO t VALUES (1, 'hello')— 1 row affected. - [ ] Run
SELECT * FROM t— result grid shows(1, hello). - [ ] Database Navigator shows table
twith columnsidandname. - [ ] Create a second table with a foreign key referencing
tand verify the ER diagram renders the relationship arrow.
Known limitations¶
- SERIALIZABLE isolation is not supported. DecentDB uses Snapshot Isolation (mapped to JDBC
TRANSACTION_REPEATABLE_READ). Attempting to setTRANSACTION_SERIALIZABLEthrowsSQLFeatureNotSupportedException. - READ_UNCOMMITTED is not supported for the same reason.
- One writer at a time. Only one connection may write concurrently. Multiple read-only connections to the same file are allowed.
- No network mode. The JDBC URL must point to a local file path. Remote file systems may work but are not tested.
- DBeaver auto-commit behaviour. DBeaver sometimes sets
autoCommit=falseon the connection. DDL statements (CREATE TABLE, etc.) are transactional in DecentDB and will not persist unless you commit or re-enable auto-commit. - No
DatabaseMetaData.getCatalogs()/getSchemas(). DBeaver may show empty catalog/schema lists; this is expected. - SQL dialect. DecentDB uses
$1,$2, … positional parameters, not?. The DBeaver SQL editor may not syntax-highlight these as parameters.
Troubleshooting¶
Native library fails to load¶
- Confirm
libdecentdb_jni.so(andlibc_api.so) exist in the directory you passed via-Djava.library.path. - On Linux, also ensure the directory is on
LD_LIBRARY_PATHor thatlibc_api.sois on the linker's rpath: - On macOS, grant the library permission if Gatekeeper blocks it:
File permissions / path issues¶
- The database file must be readable (and writable, unless
readOnly=true) by the JVM process. - Use absolute paths in the JDBC URL. Relative paths are resolved against the JVM working directory, which may differ from what you expect inside DBeaver.
"Database locked" / one-writer behaviour¶
DecentDB allows only one concurrent writer. If you see:
- Close any other connection that has an open write transaction on the same file.
- Increase
busyTimeoutMsin the connection URL to retry for longer. - DBeaver may open multiple internal connections; set the connection pool to a maximum of 1 connection in Edit Connection → Connection pool settings.
DBeaver shows no tables after connecting¶
- Refresh the Database Navigator (right-click connection → Refresh).
- Confirm you connected to the correct
.ddbfile and that the file contains tables. From a terminal you can sanity-check withdecentdb list-tables --db=/path/to/mydb.ddb.