Defining the DBEnvironment Scope [ ALLBASE/SQL Database Administration Guide ] MPE/iX 5.5 Documentation
ALLBASE/SQL Database Administration Guide
Defining the DBEnvironment Scope
ALLBASE/SQL databases are contained in a DBEnvironment. A DBEnvironment
is one or more databases that share the same system catalog and the same
logging and recovery. Databases within a DBEnvironment can be related to
each other through ISQL and in applications if security allows it.
Databases that are contained in separate DBEnvironments cannot be linked
to each other. An interactive user or application program can only
access one DBEnvironment at a time. (However, the same application can
maintain several DBEnvironment connections and access different
DBEnvironments in sequence. Refer to the section "Using Multiple
Connections and Transactions with Timeouts" in the ALLBASE/SQL Reference
Manual chapter "Using ALLBASE/SQL.")
As shown in Figure 2-10 , the DBEnvironment used by Integrated
Peripherals, Inc., has three databases.
Figure 2-10. DBEnvironment used by Integrated Peripherals, Inc.
The PurchDB database has been designed in the present chapter; the other
databases are included to illustrate the use of multiple databases in a
single DBEnvironment. All three databases are placed in a single
DBEnvironment because the data, although used separately in most
applications, is sometimes used together in reports and global
applications. The number of databases that you can put in a
DBEnvironment is limited only by the amount of disk space available to
you.
There are some reasons why you might create separate DBEnvironments for
databases.
* You may have several users who need to create and drop objects
frequently. Consider putting their databases into different
DBEnvironments, since the frequent creation and dropping of
objects by several users in the same DBEnvironment requires heavy
use of the system catalog and can cause deadlocks.
* You may have databases with different users functioning as DBA.
DBA authority is granted at the DBEnvironment level. Databases
with different DBAs should be in different DBEnvironments.
* Recovery time increases as the size of the DBEnvironment
increases.
Databases are logically separated by the owner name of the tables,
indexes, and views. They can also be physically separated for
independent manipulation through selective allocation of space using
DBEFiles and DBEFileSets. The allocation of space or physical design of
the database is covered in the next chapter.
The DBEnvironment designed for Integrated Peripherals, Inc. is the basis
for the sample DBEnvironment PartsDBE, which is included with the
ALLBASE/SQL product. Most of the examples in the rest of this book refer
to tables or other objects in PartsDBE.
MPE/iX 5.5 Documentation