Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SESAM/SQL database

A database (synonym: a catalog) can be regarded as a set of related data that is administered with the aid of a database system.

In SESAM/SQL, a database consists of the metadata in the catalog space and the user data in the associated user spaces. A database is identified by the database name.

User data

From the user's point of view, a relational database can be considered to be a set of tables. SQL users are responsible for the structure and content of the tables that they define using SQL statements. As far as the SQL user is concerned, these tables represent user data.

Metadata

In addition to the user data, a database system requires internal data which describes the structure of the user data and which is required for managing the user data. This internal data is also referred to as metadata. The metadata for a database is stored in the catalog space for that database. The user can access parts of the metadata via the schema INFORMATION_SCHEMA.

Space

User data and metadata are located on so-called spaces. Spaces are BS2000 files. They play a key role in backing up and recovering databases (see "Backup concept").

There is a distinction between user spaces, which are used to store the user data, i.e. tables and indexes, and the catalog space, which contains the metadata. In physical terms, a SESAM/SQL database comprises the user data in the corresponding user spaces and the relevant metadata in the catalog space.

On pubsets with “large files” a space can be up to 4 TB in size. Otherwise it can be up to 64 GB in size.

Database (catalog)

You create a database by issuing the utility statement CREATE CATALOG (see "Creating the database's catalog space") to create the catalog space for the database. This defines the database name. The names of all the objects which belong to the database with this catalog space are qualified using the database name.

In order to improve portability of application programs (e.g. when switching from a test environment to a productive environment), SESAM/SQL distinguishes between the logical and physical database names. The physical database name is the actual name of an existing SESAM/SQL database.

The logical database name is the name by which an application program addresses a SESAM/SQL database. If no SESAM/SQL database corresponding to this logical database name exists, it must be assigned to an existing database via the physical database name in the SQL database catalog. The logical database name is always used to qualify SQL objects with the database name.

User space

The SQL statement CREATE SPACE is used to create a user space, see "Creating, modifying and deleting user spaces".

The name of the user space can be specified in the CREATE TABLE and CREATE INDEX statements in order to create the table or index on a specific space. Any given base table or index must be located in its entirety in a single space.

ALTER SPACE allows you to change the properties of the catalog space or a user space and the name of the relevant storage group.

You use DROP SPACE to delete a user space.