PARAMETERS - DATABASE FUNCTIONAL ASPECTS
 
Previous Chapter: Installation 
 Next Chapter: The Database Manager  

The proper function of Ovrimos is based upon a set of parameters, some global, applied to all databases created, some per-database, applied to each database generated by the database manager. During the Server installation and afterwards, at creation time of each database, several files and directories are being created. The list of parameters is updated according to database creation, editing, or removal.

Parameters

The set of global and local parameters is stored in an operating system dependent place. Thus, it may be the Registry for Win 32 platforms or a file for Unix and Unix-like platforms. Instead of describing a specific operating system parameter file and/or layout, we describe the meaning of each parameter. The paragraph, Operating System dependent information, toward the end of this chapter, informs the user about the parameter location and use in each operating system.

Global Parameters

Global parameters apply to the entire Server and are usually set at installation time. Many of these parameters provide information about the location of the installed database server files.

DBMCORE
The path and file name where the dbmcore executable file is located.
SQLCORE
The path and file name where the sqlcore executable file is located.
SQLAPP4
The path and file name where the client executable file sqlapp4 is located.
PLAYBACK
The path and file name where the playback executable file is located.
HTTPSHAREDDIR
The directory which is to be used as a shared document root. This is the place where the HTTP server will search if a document is not found in the database documents' directory (docs). This directory is also used as a root for the database manager program documents and utility files.
MIMETYPES
The path and file where the mime types are located. MIMETYPES are used for BLOB display. It is a necessary file for the Server operation.
The file mime.typ contains file extensions. It looks like:
application/octet-stream       bin
image/gif                      gif
image/ief                      ief
image/jpeg                     jpeg,jpg,jpe
image/tiff                     tiff,tif
VERSION
The current version of Ovrimos.
SCHEMEINIT
The location where the initialization file of the Scheme interpreter is placed.
DBMANHTTPPORT
It is the port number to which the database manager service listens for connection. It is the HTTP port of the database manager. The default port is 9000. This port number is going to be used for any connection to the database manager. Users may change this parameter, if number 9000 is already in use.
DBMANHTTPTHREADS
The number of threads available for database manager connection requests. Default is 1 in this version and the parameter is reserved for future use.
DBMANPASSWD
The initial database manager password. This may be modified by the user. The default password is pass and it corresponds to number 485539.
Note: The encoding of the initial password is provided here, to help database administrators in case they forget the new password. In this case they may edit the global parameter (Registry in Win 32, or the dbman.ini file in Unix), replace the encoded password with 485539, login with pass and change the password again.
SERIALNUMBER
The product serial number.
LICENSE
The product license number.
The last two parameters are added by the database manager when the serial number and license are provided. They are not set at installation.

The parameter order is not significant.

Per-Database Parameters

Database parameters apply to each database. They are usually set by the database manager at creation time or by the user manually if some other means of database management is used. Some of these parameters must be unique per database.

BACKUPDIR
The backup directory for the database. In this directory, the system, data and index files of each database are automatically backed up when the database is shutdown.
Warning! The backup file must be different for each database.
BTREENUM
The total number of B-trees that will be used for all the database data structures. The BTREENUM is set at database creation time but may be edited later as necessary to satisfy the following constraint:
BTREENUM >> 2 + (1 per index + 1 per unique constraint + 1 per primary key) * number-of-tables
Tolerance should be allowed for dynamically created indices.
BTREENODECACHE
The number of nodes that may be kept in the B-tree cache.
CHARSET
The character set used for correct interpretation and display of character strings. Each database may have a different character set. Unicode as well as ASCII character sets are supported and may be displayed. The charset parameter is used to notify the browser about the character that must be displayed for each ASCII number. Default CHARSET is ISO-8859-1 (Latin). See also, the Unicode.
CIPHER
The parameter for the database cipher. At this point it may be either None or GOST.
DIR
The directory where the database files are located.
Warning! The home directory must be different for each database.
DIRTY
The dirty flag will be Y(es) or N(o) depending on updates made at the time. This is not a real functional parameter. It is  useful only to the data recovery program. Used only in Win 32. In Unix, the same information is provided by a dirty file.
HTTPPORT
The port used by the HTTP server. This must be different for each new database. The database manager proposes a unique port value at creation time. The user may edit this value (if necessary) either at creation time or later.
HTTPROOTDIR
The HTTP server's document root for each database. See also, The HTTP Server.
HTTPSESSIONTIMEOUT
A number in minutes an HTTP session is allowed to remain idle before a timeout occurs. This feature protects the system from a waste of useful session quota to idle users. Session quota, however, apply to SQL sessions not HTTP sessions.
Suggested policy, when the number of licensed connections is low, is to set this time interval to a small number.
HTTPTHREADS
Number of threads dedicated to HTTP connections, where applicable.
LOGFILE
The file where the playback log is kept. This file will be run if an abnormal termination of the server requires the rolling forward of committed and the rolling back of uncommitted transactions.
Warning! The location of the log file must be different for each database.
LOCKWAITTIME
The number of times a thread executing an SQL statement is allowed to retry a lock before quitting.
The following three parameters have to do with Ovrimos memory mapping. Each secondary file may be mapped onto main memory for enhancement of database performance. The Ovrimos virtual page may contain many operating system virtual memory pages. The number of pages one will map per file and the number of files that will be mapped onto main memory may be set by the database manager at creation time. The database administrator may tune these parameters for optimum performance even after database creation.

Note: The number of mapped files will affect the amount of RAM used for each database.

MAPPAGEFACTOR
 The number of of operating system "pages" that the Ovrimos page will contain.
MAPPAGENUM
 The number of "pages" mapped per file.
MAPFILENUM
The number of files that will be mapped to main memory.
SEMKEY
The semaphore key. It must be different for each new database. The assignment of a different SEMKEY to a different database is the Database Management program's  responsibility and is transparent to the user.
SHMEMKEY
The shared memory key. It must be different for each new database. The assignment of a different SHMEMKEY to a different database is the Database Management program's  responsibility and is transparent to the user.
SQLPORT
The port for SQL connections. The SQL port is assigned by the Database Management program's and must be different for each database created.
TEMPDIR
The temporary data directory for the database. Locks and other volatile information is kept there.
Warning! The temporary directory must be different for each database.
AGIDIR
The directory with all executable programs written with special client libraries to be used as stored procedures.
CRYPTOKEY
The location of the file where the encryption key is stored (for encrypted) databases.
See also, the Database Managent program.
SCHEMEHANDLERS
A file with URL addresses and URL script handlers for the Scheme interpreter. The format of this file includes the URL, the script and an indicator showing whether authentication for the database user is required in order to execute the script. If the indicator is absent, no authentication is required.
The parameter order is not significant.
 

Operating System dependent information

As mentioned above, all parameters and files are required in all operating systems. The difference between the Win 32 based systems and the Unix systems is the place where the parameters are stored. There are also a few differences in the files and directories created.

Win 32 parameters

For Win 32 systems all parameters are placed by the installation program in the Registry. The installation procedures update the Registry as follows:

Under the key HKEY_LOCAL_MACHINE in the SOFTWARE key, a new key, named Ovrimos is created. The \SOFTWARE\Ovrimos\SQLSERVER key contains global parameter information.
The next two captions are taken from a computer, where the default installation directory Ovrimos was used.

Picture param-1.  Global parameters registry key for WIN 32 systems.

In addition to global information, the SQLSERVER key contains one more key, DATABASES.
The \SOFTWARE\OVRIMOS\SQLSERVER\DATABASES is a tree of installed databases. Every database created will have an entry key under the DATABASES key.
The installation program allows for automatic creation of one database, called testbase. Thus, after installation, there is the key, \SOFTWARE\OVRIMOS\SQLSERVER\DATABASES\testbase which contains all the database parameters.

The following caption is an example of the registry for a database called testbase, which was automatically placed in the default \Ovrimos directory.


 

Picture param-2. Testbase database parameters Registry key.
 

Unix parameters

For Unix and Unix-like systems, all global parameters are written in a file named dbman.ini, which is copied into the installation bin directory. All global parameters described above make the lines of this file, plus one line of the form:
DBASE=dbname=path
for each of the databases created. This line shows where the initilization file of each database is.
The following is an example of the global parameters dbman.ini file.

DBMANHTTPPORT=9000
DBMANHTTPTHREADS=1
DBMANPASSWD=485539
DBMCORE=/home/ovrimos/bin/dbmcore
HTTPSHAREDDIR=/home/ovrimos/bin/shared/
LICENSE= The license number
MIMETYPES=/home/ovrimos/bin/mime.typ
PLAYBACK=/home/ovrimos/bin/playback
SCHEMEINIT=/home/ovrimos/bin/shared/init.scm
SERIALNUMBER= The product serial number
SQLAPP4=/home/ovrimos/bin/sqlapp4
SQLCORE=/home/ovrimos/bin/sqlcore
VERSION=2.5
DBASE=testbase=/home/ovrimos/testbase/testbase.ini
 

The last entry
database=testbase=/home/ovrimos/testbase/testbase.ini shows that the database testbase initialization file resides in directory /home/ovrimos/testbase/testbase.ini

For each of the databases created, there is a file of local parameters, named <dbname>.ini, i.e. for a database called testbase it is testbase.ini, while for a database called books, it is books.ini. The global parameter file ovrimos.ini shows the path to each database initialization file.
In turn, the database initialization file contains all the database parameters, as described above, plus a line of the form:
global=/usr/ovrimos/bin/dbman.ini, showing that the global parameter file resides in directory /usr/ovrimos/bin.

AGIDIR=/home/ovrimos/testbase/agi/
BACKUPDIR=/home/ovrimos/testbase/backup/
BTREENUM=200
BTREENODECACHE=2000
CHARSET=ISO-8859-1
CHIPHER=None
DIR=/home/ovrimos/testbase/
HTTPPORT=8081
HTTPROOTDIR=/home/ovrimos/testbase/docs/
HTTPSESSIONTIMEOUT=15
HTTPTHREADS=3
LOGFILE=/home/ovrimos/testbase/playback.log
LOCKWAITTIME=1000
MAPPAGEFACTOR=4
MAPPAGENUM=8
MAPFILENUM=10
TEMPDIR=/home/ovrimos/testbase/
SEMKEY=2001
SHMEMKEY=2000
SQLPORT=3000
SCHEMEHANDLERS=/home/ovrimos/testbase/handlers
GLOBAL=/home/ovrimos/bin/dbman.ini
 

Files

After installation, some directories are created and several files are copied there. The installation for Win 32 proposes the path C:\Ovrimos as a root directory of the SQL Server and the databases. The user may change this path at installation time.

Unix users may choose the directory they will use as an application root and they may uncompress the product there.

Regardless of the path, the installation program will create the following directories into the product root directory:

bin: Executable files and utilities directory

libsrc: C include files and source files for making a client library (C, C++ API). A readme file describes the contents of the directory as well as the steps required to build a client library.

samples: Some sample C, Java, and Perl  files to be used as examples for API and Stored procedures.

shared: All utilities and files shared by the Web server.

shared\help: The on-line manual pages.

testbase: The test database generated during installation

Some files are also placed in the application root directory:

DeIsL1.isu:  Uninstall log (Only for Win 32)

readme.txt: A file with concise instructions.

dbman.create.ini: A script that must be run after installation in Unix to create the database manager and the testbase initialization files. (Only for Unix)

Contents of the bin directory

All executable files as well as a few utility files are placed in the application bin directory.

dbman: The database manager executable program.
dbmcore: The database core executable program.
sqlcore: The sqlcore executable program.
sqlapp4: A 'bare' SQL terminal executable program.
playback: The playback executable program to be run after a database abnormal termination.
mime.typ: The mime types file, used for BLOB display.
init.scm: The initialization file for Scheme.
ovrimos.ini: Global parameter file. (Only for Unix systems)
 

Contents of the shared directory

This is the directory for all the database manager utility files, as well as all webspace used by the HTTP server and shared by all databases. Scheme scripts and HTML files placed there are used by the server programs and must not be altered by the users.

Among other files:

index.htm: A welcome page, used by all databases, unless a database already has a customized one.
ovjdbc.jar: The Ovrimos JDBC driver in .jar form.
DBD-Ovrimos-0.10.tar.gz: The Perl DBD file in zipped form. (May be unzipped by Winzip)

Contents of the samples directory

The samples directory contains scripts and files that may be used as examples of database usage.

Contents of the testbase directory

The testbase subdirectory is initially a directory devoid of data files. Some other files, put there during installation, are used by the HTTP Server for working examples of the use of Scheme scripts. The testbase directory  contains the subdirectories backup, docs, and agi. Backup  and agi are initially empty, while docs contains an SQL script which may be used to fill the database with test data to be used with the Scheme example.
The system tables, log etc. will be generated the first time a user starts the database. The backup will also be filled as soon as the first files are generated. The agi subdirectory is used for stored procedures, while the docs is the directory where all private HTML documents will be placed. If a document is not found in the docs directory, the Web browser will search the directory declared as shared by all databases.
 
 
 
Previous Chapter: Installation