HP 3000 Manuals

Procedures for Starting Up [ Up and Running with ALLBASE/SQL ] MPE/iX 5.0 Documentation


Up and Running with ALLBASE/SQL

Procedures for Starting Up 

In TurboIMAGE, you start up a database with the following steps:

   1.  Create a schema.  A common way of doing this is to enter the
       schema into a text file created with an editor.
   2.  Run DBSCHEMA to generate a root file from the schema.
   3.  Run DBUtil to create data sets based on the root file.

The schema contains definitions of all the data items in your database,
and it describes all the data sets in the database.  It also specifies
the required security for the database by defining passwords for specific
users.

In ALLBASE/SQL, you start up a DBEnvironment with a simple SQL command.
The command may be issued interactively (through ISQL), or through an
application program.  The START DBE NEW command is as follows:

     START DBE ' DBEnvironmentName' NEW

The START DBE NEW command creates a file known as a DBECon file, which is
similar to the root file in TurboIMAGE. The DBECon file contains
information about startup parameters for the DBEnvironment and its logs.
START DBE NEW also creates a structure within the DBEnvironment known as
a system catalog, which is a set of information about all the databases
in the DBEnvironment.

Use of a Schema 

In TurboIMAGE, a schema is required to define a database.  Most users
create the schema in an ASCII file.  Once the database exists, the schema
can serve as a record of its contents.  The schema can also be used to
create the same database structure in different groups and accounts or on
different systems.

You can also create a schema for ALLBASE/SQL by entering into an ASCII
file all the SQL commands needed to configure the DBEnvironment and
create all the objects in it.  You can use this file as input to ISQL.
However, in ALLBASE/SQL, no schema is required; all that is necessary to
configure a DBEnvironment is a START DBE NEW command issued through ISQL
or an application program.

Root File versus DBECon File and System Catalog 

In TurboIMAGE, the root file, which is generated by DBSCHEMA from the
schema, contains security information and definitions of all the data
sets in the database, together with the name of the database creator.

The DBECon file in ALLBASE/SQL is created when you issue the START DBE
NEW command.  The DBECon file, which has the same name as the
DBEnvironment, contains the name of the DBECreator and the names of the
logs associated with the DBEnvironment.  It also indicates startup
parameters, such as SINGLE or MULTI user mode, and others (examples are
shown in the section "Examining Startup Parameters with SQLUtil" in
chapter 4).

In ALLBASE/SQL, structural information is also stored internally in a set
of system tables known as the system catalog.  This is like an internal
schema.  The DBECon file does not contain the names of tables or other
database objects; these are stored in the system catalog.

Data Files for Data sets versus DBEFiles for Tables 

Each data set in a TurboIMAGE database occupies a separate MPE XL file,
created by TurboIMAGE as a PRIV file.  The file size is determined from
the capacity you indicate for the data set in the schema.

In ALLBASE/SQL, you create a table inside a DBEFileSet, to which you have
added one or more DBEFiles.  These DBEFiles need to be large enough for
the amount of data you need to store.  Instead of specifying a capacity,
you create DBEFiles of whatever size is needed.  DBEFiles can hold
data and/or indexes for more than one table at a time; no simple
correspondence between tables and data files exists.  You do not specify
the size of a table when you create it; the table size is limited only by
the capacity of your system.  As you need additional space for a growing
table, you add DBEFiles to the DBEFileSet in which the table was created.
This increases the capacity of the table.  (An exception to this is
tables created as hash structures, described in a later section.)

Naming Conventions 

The names of data items and data sets within a TurboIMAGE schema may
contain some characters which are not allowed in ALLBASE/SQL. For
example, the hyphen is not allowed in ALLBASE/SQL names; so hyphens need
to be represented in some other way in ALLBASE/SQL, for example, by an
underscore (_).



MPE/iX 5.0 Documentation