TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
48 Chapter2
Database Structure and Protection
Database Files
Database Files
Database elements are stored in privileged MPE/iX disk files. In addition to the root file
which contains the database definition, other files that contain data are called data sets.
Root File
The root file serves as a common point of entry to, and a source of information about, the
database. The root file is a single-extent MPE/iX disk file; that is, the entire file occupies
contiguous sectors on the disk.
The person who creates the root file is the database creator and can subsequently create
and initialize the database. The root file is created within the database creator's logon
group and account when the Schema Processor is executed. The root file has a local file
name identical to the database name. Thus, the name of the root file for the ORDERS
database is ORDERS. Refer to the MPE/iX Commands Reference Manual for more
information about MPE/iX account and logon groups.
Data Files
For non-jumbo data sets, there is one data file for each data set of a database. The size of
each record and number of records in the file are defined by the database schema, and that
information is recorded in the root file. The data files are created and initialized by the
DBUTIL utility.
Each data file is created within the same group and account as the root file. Local file
names are created by appending two characters to the local name of the root file. These two
characters are assigned to the data sets according to the order defined in the schema. For
example, the ORDERS database is defined with DATE-MASTER and CUSTOMER as the
first two data sets. These data sets are in data files ORDERS01 and ORDERS02. For
jumbo sets and sets with B-Tree indices, the chunks or index files are created using POSIX
file format. For chunks, the local file name is appended with ".001", ".002", and so on. For
example, ORDERS01.001 and ORDERS01.002 for two chunks of ORDERS01. For index
files, the local file name of the master is appended with ".idx" (lowercase). For example,
ORDERS02.idx for the master set CUSTOMER with a B-Tree index. (Refer to the
>>CREATE command of DBUTIL in chapter 8.)
Each data file is physically constructed with as many extents of contiguous disk sectors as
needed to meet the capacity requirements of the file, subject to the constraints of the
MPE/iX file system. Each data file contains a user label in a disk sector maintained and
used by the TurboIMAGE/XL library procedures. The label contains structural pointers
and counters needed for dynamic storage allocation and deallocation.
Media Record Length
Media record lengths vary between data sets but are constant within each file. Each record
is large enough to contain a data entry and the associated TurboIMAGE/XL pointer
information. The amount of pointer information depends on the way the data set is
defined. Pointer information is described in chapter 10. The maximum number of records
in a data set file depends on the media record size, the available disk space, and the