To create a database you must use the mkdbase command.
Databases may be of two types:
Partition database. This can be constructed in three ways:
A partition database can have up to 231 frames with the default 1Kbyte frame size, this gives a maximum size of 2 Terabytes (2048Gbytes).
Filestore database (UNIX only). This is simple to configure, but has limitations when compared to the other types of database. It is best suited to small databases such as those used for test purposes.
A filestore database is constructed using the host file system. Each Reality dictionary and data file equates to a normal host file and each account is equivalent to a host directory. Because of this, a filestore database expands and contracts as you add and delete data.
The maximum size of a filestore database is determined by the size of the containing partition.
A newly created database is locked to all users except the owner and, on UNIX, the super-user. The database must be configured (see Reality Configuration on the Host) before it can be unlocked (see Locking and Unlocking a Database).
Note: On Windows Vista, databases that will be available on the network must be created in a folder with unrestricted access, such as a dedicated subfolder within the root folder. A database in a users home folder cannot be accessed remotely.
To create a partition database on a single file system, enter:
mkdbase -N databaseName -Ssize{
files}
{
databasePath}
where databaseName is the network name that you will use to connect to the database, and databasePath is the path to the directory that will hold the database files.
The size of the database is specified by the size parameter you can specify size in Megabytes or Gigabytes by using the appropriate suffix (M or G respectively). files specifies the number of files used (default 10). For example, to create a 20Gbyte database called dbase1 in the current directory, enter:
mkdbase -N dbase1 -S20G
The database will consist of ten 2Gbyte files.
Note: Choose the number of files carefully you enlarge this type of database by adding more files that are the same size as the existing ones.
This type of database is the default. If you omit the S option and there is no corresponding entry in realfstab (see below), a partition database is created consisting of a single host file with 20000 frames (see Frame Size).
To create a partition database using disk partitions or files on different file systems, add an entry to the realfstab file listing the partitions or files (as appropriate) assigned to the database. Then enter:
mkdbase -N realfstabEntry
where realfstabEntry is the name of the entry in the realfstab file. For example, having created a realfstab entry called dbase1, create the database by entering:
mkdbase -N dbase1
The database's base directory will be created in the current directory.
To create a filestore database, enter:
mkdbase -U -N databaseName{
databasePath}
where databaseName is the network name that you will use to connect to the database, and databasePath is the path to the directory that will hold the database files. If you omit databasePath, a sub-directory with the same name as the database is created in the current directory. For example, to create a filestore database called dbase1 in the current directory, enter:
mkdbase -U -N dbase1
A partition database on a single filesystem can be enlarged by adding files. Enter:
mkdbase -N databaseName -A files
where databaseName is the name of the database and files is the number of files to add. The files will be the same size as the existing ones this depends on the size of the original database and number of files used (see Making a Database).
There are two ways of enlarging a partition database that uses disk partitions or files on different file systems:
Add new partitions or files outside the striping scheme to the realfstab file. Then add them to the database with the host command:
mkdbase -a realfstabEntry
where realfstabEntry is the name of the entry in the realfstab file.
This method should be used only if insufficient time is available to rebuild the database. When time permits, you should rebuild the database with a revised striping scheme.
A filestore database expands and contracts automatically as you use the database.
In some circumstances it may be desirable to rebuild an existing database. This can be done using mkdbase with the r option.
Caution
When you rebuild a database, the top database directory and the config file are retained, but the rest of the database is removed and rebuilt. Any user data in the existing database which you wish to keep must be saved, and restored on the re-constructed database.
To remove a database you must use the rmdbase host command.