Physical structure of a Zim database
The files that make up a Zim application are implemented in your operating environment’s file system. This section discusses how the various types of files are mapped onto that file system. This section looks only at the default organization. The default organization can be changed using Zim tools.
By default, Zim stores all database files, audit files, and document files in one operating system directory. This directory is the database directory; that is, the directory in which the ZIMINIT utility created your database.
When you start Zim Server, all databases that are going to be serviced are described in the zimdb.zim file.
When you start a Zim session, it assumes, unless told otherwise, that the default (i.e. current) operating system directory is the database directory and creates a working directory according the rules in the next item.
By default, Zim stores all working files in a sub-directory of the database directory, under a name that is formed using the number of the user connected to the database or under the name of the user that connected to the database.
The working directory can be created in a different place from the database directory by providing the configuration option “work directory” in the zimconfig.zim configuration file.
Another configuration option, “user name directory”, tells whether the working directory name must be a number or the name of the user.
WARNING: On UNIX systems, to properly allow users to log in and log off, the umask setting must be set correctly to allow working directory sharing by issuing the command:
Relationship between Zim Directories and Operating System Directories
Many operating systems use the concept of the directory as a means of organizing the various components of a file system. An operating system directory contains the definition of file system components such as files and other directories.
Zim also uses the concept of directories as organizational tools. A Zim directory contains the definitions of objects in your database, such as EntitySets, forms, and other ZIM directories.
Zim directories are quite independent of operating system directories. In fact, a Zim directory is itself implemented as an operating system. For example, the Zim root directory is usually stored as a file called zim0001. For every Zim directory created, Zim also creates an operating system directory in which compiled Zim programs are stored. For example, the operating system directory that Zim creates for the Zim root directory is usually called zim0001.ws.
Special Document File Names
Within Zim, the file name associated with a Zim document is normally a valid operating system file name or device name. However, Zim also recognizes special file names, with specific file prefixes. For more information on these file prefixes and their meanings, see File Path Prefix Characters.