Apache Derby Database Management in VS Code
Overview
Section titled “Overview”Apache Derby is a relational database written entirely in Java, distributed by the Apache Software Foundation. It runs embedded inside the JVM with zero configuration, ships in a few JARs, and speaks standard SQL. Inside DBCode it works the same way SQLite or PGlite do — open a database, browse the schema, run queries — but with the JDBC-driven Java SQL surface.
Highlights:
- Three connection modes: In-Memory (data discarded when the connection closes), Embedded (a directory on disk), or Server (network).
- Pure Java: no native binaries; runs anywhere the Java runtime that DBCode bundles runs.
- Standard SQL: tables with constraints, views, triggers, sequences, synonyms, procedures and functions (Java method references).
Derby is a great fit for prototypes, embedded data layers in Java apps, and lightweight integration test fixtures.
Connecting
Section titled “Connecting”To connect to a Derby database in DBCode:
- Open the DBCode Extension in Visual Studio Code.
- Add a New Connection and choose Apache Derby.
- Pick a connection mode:
- In-Memory — fastest start; pick a name like
mydb. Set “Create if not exists” to bootstrap a fresh DB. - Embedded (Directory) — pick a folder. Set “Create if not exists” if it’s a new database.
- Server (Network) — point at a running Derby Network Server (default port 1527). Provide username + password.
- In-Memory — fastest start; pick a name like
- Connect.
Derby features in DBCode
Section titled “Derby features in DBCode”- Full schema browser: schemas + tables (with columns, indexes, primary keys, foreign keys, unique/check constraints, triggers) + views + procedures + functions + sequences + synonyms.
- DDL scripting for views: views’ definitions come straight from
SYS.SYSVIEWS.VIEWDEFINITION. For other object types DDL scripting is intentionally not generated — Derby doesn’t expose machine-readable definitions for tables/triggers/etc., and reconstructing them from system catalogs would mean shipping fragile parsers. Use the SQL editor to inspect or modify those objects. - CRUD on tables: edit data through DBCode’s grid.
For more information about Derby, check out db.apache.org/derby.