Sub-engines are modules of implementation that are used by the core engine to provide specific database services. The core engine works on the interface defined by the abstract base class of each sub-engine type. NexusDB ships with a standard set of sub engines to provide a complete database implementation.
Sub-engines are a unique architectural feature that differentiates NexusDB from other database implementations. Sub-engines can be replaced or modified to best meet application demands. This architecture provides unmatched flexibility and extensibility and encapsulates specific responsibilities to specialized modules.
The core engine, without change, will be able to support virtually any set of features in the future. For example, sub-engines can change the way NexusDB stores its data, compares its key values or structures its Indices. If your application requires a specific indexing algorithm, create a sub-engine.
Here are NexusDB's sub-engines and their associated responsibilities:
• |
Key - Responsible for generating and comparing Key Values |
• |
Auto Inc - Responsible for assigning Auto Increment values |
• |
Index - Responsible for Inserting, Deleting and Finding Keys. The actual storage of the Key values in the Index File and navigational routines are also handled within this sub-engine. |
• |
Indices - This sub-engine is a container of Index sub-engines. It dispatches Key changes to the appropriate Index sub-engines. |
• |
Blob - Responsible for storing and retrieving Blobs. |
• |
Record - Responsible for storing and retrieving Records. |
• |
Encryption - Responsible for encrypting and decrypting blocks of data. |
• |
Heap - Responsible for allocating and deallocating blocks within a file. |
• |
Block Heap - Responsible for allocating and deallocating segments of data (i.e. bytes) within a block. |

Each sub engine has a well defined interface and is registered to particular database objects within the data dictionary. The diagram above details the relationships between each sub engine and how each works together to provide key services to the core database engine.
Descriptors specify sub-engines by name, not by direct object references. This decouples the actual sub-engine implementation from the Data Dictionary specification. This means that anyone can easily add sub-engine implementations and specify them within existing descriptors.