Derby SQL Language System


Compilation Flow

  1. LanguageParse: Parser generates QueryTree from SQL statement text.

  2. LanguageBind: Bind phase checks semantics.

  3. LanguageOptimize: Optimization modifies QueryTree.

  4. LanguageGenerate: Generate Java byte code for execution.

Data Structure Notes

  1. DataTypeDescriptor

  2. TypeCompiler

  3. types package JavaDoc

  4. StatementCache: Derby caches prepared statements to avoid unnecessary re-preparation.

JDBC Hookup


For the lifetime of the execution, either until the ResultSet is closed, or the executeUpdate() call returns, the Statement has a one-to-one relationship with a single use Activation. Once the statement is complete the activation will be closed.

java.sql.PreparedStatement & CallableStatement

The application's JDBC PreparedStatement or CallableStatement has a one-to-one relationship with an Activation. The Activation maintains the state of the execution including parameters and linkage to the shared statement plan.


please fill in

Other info Derby internals presentation

LanguageSystem (last edited 2009-09-21 14:57:30 by BryanPendleton)