SAND CDBMS Tools Reference Guide
Database Configuration Tool (nconfig)

 

x
Chapter Index
Next Topic:
Invoking and Using nconfig

 

Database File Configuration Overview


Database Files

A SAND database consists of one or more host operating system files. In these files, SAND CDBMS stores the database configuration information and all data represented as database tables (including system tables). These database files can be accessed only by nconfig and other SAND CDBMS tools.


The Primary Database File

The primary database file has a file name extension of .n00. The primary database file contains the database configuration information, in addition to data stored in tables.

The primary database file is also called the database root, because SAND CDBMS stores data exclusively in the primary database file until its maximum size is reached; only then does SAND CDBMS begin to store data in a second data file. Once the second data file reaches its maximum size, SAND CDBMS begins storing data in the third data file, and so on. In this sense, the primary database file is the root of a sequence of SAND database files.


Secondary Data Files

Secondary data files are created by SAND CDBMS as needed, and have file name extensions that reflect their relative position in the sequence of data files for that particular database. The file name has the form database-name.nxx, where xx is a hexadecimal number which reflects the position of the file in the sequence of secondary data files. For example, if testdb.n00 is the database root, testdb.n01 would be the second data file, testdb.n02 would be the third, testdb.n03 the fourth, and so on. When testdb.nff is reached, the next data file would be testdb.n100, followed by testdb.n101, and so on, until the last possible data file, testdb.nfff.


How SAND CDBMS Uses the Database Files

In the UNIX environment, all information contained in SAND database files is normally stored in one-megabyte blocks (note, however, that UNIX versions of the product are available that use a 64-kilobyte block size; block size can be verified by issuing the nconfig View Configuration command and consulting the Page Size value). In Windows, this information is always stored in 64-kilobyte blocks. The configuration information stored in the primary database file is located in the first 1-MB or 64-KB block in the file. This first block is referred to as the configuration record. It may be accessed and modified only by the nconfig tool. All other information is written to and read from the primary and secondary database files by SAND CDBMS when a database is started using the nserv utility.

SAND CDBMS writes and reads all information to and from the database files by way of SQL or the SAND CDBMS Data Loader (ndlm).

SAND CDBMS creates secondary database files on an as-needed basis, and distributes them among the available file system/path locations (specified using nconfig) in round-robin fashion. That is, once a database file reaches the maximum size specified for files on its particular location, SAND CDBMS creates the next database file on the next file system/path location in the list.

SAND CDBMS uses the primary database file exclusively until the file reaches its prescribed maximum size. At that point, SAND CDBMS creates the first secondary data file (that is, database-name.n01). When that data file reaches its maximum size, SAND CDBMS creates the second secondary data file. SAND CDBMS continues in this fashion up to the maximum number of database files, which is 4096.

 

x
Chapter Index
Next Topic:
Invoking and Using nconfig