3 Database Definition

Introduction

All Eloquence databases are defined using the database definition language (DBDL). Once the database has been defined using the DBDL, an editing program is used to create a text file containing the database definition. This definition, known as a schema, is used by the schema program to creste the database catalog. The database catalog is stored on the databse server and contains the structural information of the database. Database utilities are used to allocate server resources for the databases (beyound the structural information). This is called database creation. Transposed to the more common file system paradigm, creating the database catalog would be equivalent to the creation of a directory and creating the data sets would be equivalent to creating files in the directory. Once the database has been created, the database is ready to be accessed by either application programs or Eloquence Query. This database definition sequence is summarized below.

  1. Define the database using the DBDL.

  2. Use a text editor (for example, vi on UNIX or notepad on Windows) to create the schema.

  3. Execute the schema program to create the database catalog.

  4. Use utilities to create the database.

Database Definition Procedure

A database definition is organized into three sections--password, item, and set. Each section defines a particular part of the database. Additional statements are used to specify the database name, to specify page control, and to designate the end of the database definition. A database definition is organized as shown below.

   BEGIN DATABASE database-name definition;

   DEFAULT LANGUAGE collating sequence definition;

   PASSWORDS:password-definition section;

   ITEMS:item-definition section;

   IITEMS:index-item-definition section;

   SETS:set-definition section;

   END.
Each database definition statement must begin on a new line. Comments, which start with either a # or double carets (<<), will be ignored until end of line.


Eloquence Database Manual - 19 DEC 2002