The DataDictionary provides an object-oriented API to the SystemTables.

The API to the DataDictionary lives in the org.apache.derby.iapi.sql.dictionary package.

Additional internal implementation classes for the DataDictionary are found in the org.apache.derby.impl.sql.catalog package.

Classes in the DataDictionary API tend to correspond closely to the SystemTables. These classes are called "Descriptor" classes. So, for example, there is TableDescriptor which provides the object-oriented API to a row in SYSTABLES.

Other major classes are ColumnDescriptor, ViewDescriptor, ConstraintDescriptor, TriggerDescriptor, etc.

Classes in the compile and execute portions of the LanguageSystem gain access to the DataDictionary via the LanguageConnectionContext, which in turn is accessed via the ContextManager.

Factory classes in the internal implementation are responsible for constructing Descriptor classes from the SystemTables. So, for example, SYSTABLESRowFactory knows how to make a TableDescriptor from a row in the SYSTABLES table.

An important (and complex) part of the DataDictionary implementation is DataDictionaryCaching.

  • No labels