Skip to content

Databases

Apache Derby Database Management in VS Code

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.

To connect to a Derby database in DBCode:

  1. Open the DBCode Extension in Visual Studio Code.
  2. Add a New Connection and choose Apache Derby.
  3. 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.
  4. Connect.
  • 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, triggers, procedures and functions: these are reconstructed from Derby’s system catalogs (SYS.SYSVIEWS, SYS.SYSTRIGGERS, SYS.SYSALIASES), so you can script an existing view, trigger, procedure or function as runnable CREATE DDL. Tables and other object types have no machine-readable definition in Derby, so DDL scripting is not generated for them - use the SQL editor to inspect or modify those.
  • CRUD on tables: edit data through DBCode’s grid.

For more information about Derby, check out db.apache.org/derby.