Distributing Database Files

An application is composed of a number of different types of files including

You can control where these files are located. Changing the location of files can be useful for

Distributing database files using the areas feature

By default, all database files are located in the database operating system directory.

The areas feature enables you to distribute the database files that correspond to entity sets, relationships, directories and compiled application programs in order to take advantage of the file system and possibly reducing the system overhead.

To use the areas feature, create an areas file named areas.zim.

To be effective, the areas file must reside in the database directory.

Using the Areas file

Entries in the areas file indicate the locations to which particular files were distributed. The areas file must contain one entry per record, and the entry must take the form

nnnn path

where

nnnn is the number taken from the file name (i.e. ZIMnnnn) of the file that corresponds to the desired directory, entity set or relationship.

path is the name of the directory where file ZIMnnnn is to be found. If ZIMnnnn is a file that stores a directory, then path is also the location where the operating system sub-directory for compiled application programs (ie ZIMnnnn.WS) is found.

Path can be preceded by three of the same special relocation prefixes used with document file names (see special document file names). The table below describes the meaning of the prefixes when used with path.

Prefix and Path

Interpretation

)path

The user's work directory path is added to the front of path.

"path

The user's database directory is added to the front of path. This choice is useful when you are working with foreign directories.

#path

The directory defined by the Zim environment variable in the registry.

If a file lacks an entry in the areas file, the software assumes that the file is located in the database directory.

Distributing documents

Zim documents can be distributed throughout your file system by including an appropriate file name in the FileName field of the documents entity set in the object dictionary. The file name can be any file or device name that is valid in your operating environment.

Per-user documents

You can define documents that are stored on a per-user basis in the user's work directory.

Per-user documents are declared in the Object Dictionary by placing the work path indicator (a right parenthesis) in front of the FileName entry in the Documents EntitySet. Per-user documents operate the same way as per-user database files. Identifying a document as per-user instructs the system to look for the file on the disk as indicated by the work path configuration option.

Distributing work files

The temporary work files used by the system are stored in the work directory. The work directory is set in the user configuration files by a work path entry.

Distributing Audit files

Audit files, which are normally created in the database directory, can be relocated by setting the audit path and backup path entries in the Zim Server configuration file.