A relational database is
a database that can be perceived as a set of tables and can be manipulated
in accordance with the relational model of data. The relational database
contains a set of objects used to store, access, and manage data.
The set of objects includes tables, views, indexes, aliases, user
defined types, functions, procedures, sequences, variables, and packages.
There are three types of relational databases a user can access
from a System i® product.
- system relational database
- There is one default relational database on any System
i product. The system
relational database is always local to that System
i product. It consists
of all the database objects that exist on disk attached to the System
i product that are not
stored on independent auxiliary storage pools. For more information
on independent auxiliary storage pools, see the System Management category
of the i5/OS® Information Center.
The
name of the system relational database is, by default, the same as
the System
i system
name. However, a different name can be assigned through the use of
the ADDRDBDIRE (Add RDB Directory Entry) command or System
i Navigator.
- user relational database
- The user may create additional relational databases on a System
i product by configuring
independent auxiliary storage pools on the system. Each primary independent
auxiliary storage pool is a relational database. It consists of all
the database objects that exist on the independent auxiliary storage
pool disks. Additionally, all database objects in the system relational
database of the System
i product
to which the independent auxiliary storage pool is connected are logically
included in a user relational database. Thus, the name of any schema
created in a user relational database must not already exist in that
user relational database or in the associated system relational database.
Although the objects in the system relational database are logically
included in a user relational database, certain dependencies between
the objects in the system relational database and the user relational
database are not allowed:
- A view must be created into a schema that exists in the same relational
database as its referenced tables and views, except that a view created
into QTEMP can reference tables and views in the user relational database.
- An index must be created into a schema that exists in the same
relational database as its referenced table.
- A trigger or constraint must be created into a schema that exists
in the same relational database as its base table.
- The parent table and dependent table in a referential constraint
must both exist in the same relational database.
- Any object in the system relational database can only reference
functions, procedures, and types in the same system relational database.
However, objects in the user relational database may reference functions,
procedures, and types in the system relational database or the same
user relational database. However, operations on such an object may
fail if the other relational database is not available. For example,
if a user relational database is varied off and then varied on to
another system.
A user relational database is local to a System
i product while the
independent auxiliary storage pool is varied on. Independent auxiliary
storage pools can be varied off on one System
i product and then varied
on to another System
i product.
Hence, a user relational databases may be local to a given System
i product at one point
in time and remote at a different point in time. For more information
on independent auxiliary storage pools, see the System Management category
of the i5/OS Information Center.
The
name of the user relational database is, by default, the same as the
independent auxiliary storage pool name. However, a different name
can be assigned through the use of the ADDRDBDIRE (Add RDB Directory
Entry) command or System
i Navigator.
- remote relational database
- Relational databases on other System
i and non-System
i products can be accessed
remotely. These relational databases must be registered through the
use of the ADDRDBDIRE (Add RDB Directory Entry) command orSystem
i Navigator.
The database manager is the name used generically to identify the System
i Licensed Internal
Code and the DB2® for
i portion
of the code that manages the relational database.