The minibase_globals variable is a pointer to a SystemDefs object. The SystemDefs class has public data members for the various components of the system: the buffer manager, the disk space manager, and so on. These are referred to throughout the Minibase code by C preprocessor macros declared in system_defs.h; for example, MINIBASE_BM for the buffer manager.
This object, minibase_globals, is responsible for creating all its constituent objects to create or open a Minibase database, and for destroying them all to close it again. You open a database by creating a SystemDefs object and assigning it to minibase_globals, and you close it by deleting minibase_globals.
There can only be one instance of the SystemDefs class, and it is always pointed to by minibase_globals.
In addition to managing the catalog objects for Minibase proper, ExtendedSystemDefs also creates a systemCatalogs object (see below) that knows how to read the Minibase catalogs. This includes the optimizer, which can operate autonomously from a Minibase database, into the system and lets it work with real data.
The reason for separating the catalogs from the rest of the system is simply to allow the lower levels of the software to be used without imposing the higher-level structure required by the catalogs.
There are two concrete subclasses of ii_SystemCatalogs: ii_BogusSystemCatalogs and ii_MinibaseSystemCatalogs. The "bogus" one reads a "bogus catalog" file, which is a text file that contains catalog information without the need for an actual database behind it. This is useful for learning about how optimizers work in different catalog environments. The other one actually reads the Minibase global catalogs of the current open database.
Back to the List of Components
Back to the Minibase Home Page