A schema defines the format of the application data in WiredTiger. WiredTiger supports various types of schemas (See Schema, Columns, Column Groups, Indices and Projections for more information), operated upon through a WT_SESSION reference. This section details the internals of these various schema operations.
Schema operations cause an update to the metadata and are performed under a schema lock to avoid concurrent operations on the same object. The following sequence of steps define a generic schema operation:
The create schema operation is responsible for creating the underlying data object on the filesystem with the right parameters and then creating an entry for this new object into the metadata. The sequence of operations involved in a create for various schema types are as follows:
The rename schema operation is responsible for renaming the underlying data object on the filesystem and updating the metadata accordingly. The sequence of operations involved in a rename for various schema types are as follows: