Derby SQL Language System
Compilation
Compilation Flow
- LanguageParse: Parser generates QueryTree from SQL statement text.
- LanguageBind: Bind phase checks semantics.
- LanguageOptimize: Optimization modifies QueryTree.
- LanguageGenerate: Generate Java byte code for execution.
Data Structure Notes
- DataTypeDescriptor
- TypeCompiler
- types package JavaDoc
- StatementCache: Derby caches prepared statements to avoid unnecessary re-preparation.
JDBC Hookup
java.sql.Statement
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.
Execution
please fill in
- TriggerImplementation Notes on the implementation of triggers.
Other info
http://db.apache.org/derby/binaries/ApacheDerbyInternals_1_1.pdf Derby internals presentation