The basic structure of a SESAM/SQL database simply comprises the catalog space and, if logging is enabled, the CAT-REC file and the first CAT-LOG file. The basic structure can be extended as follows to create an operational SESAM/SQL database capable of accommodating user data:
Creating system entries
Granting special privileges
Defining storage groups for user spaces
Inserting the first media record for DA-LOG and PBI files or the HSMS work file in the media table
Creating user spaces
Creating schemas
The structure of an operational SESAM/SQL database can be modified by means of the following measures to adapt it to current requirements:
Creating and deleting system entries
Granting and revoking special privileges
Defining, modifying, and deleting storage groups for user spaces
Maintaining the media table (inserting or deleting media records, modifying descriptions of file attributes in the media table)
Creating, modifying, and modifying user spaces
Creating, modifying, and deleting schemas
Modify properties of the database
The above measures are explained in detail in the sections that follow.
The table below provides an overview of the activities that need to be carried out, and links the tasks with the relevant SQL or utility statement. The right-most column indicates the main functions in the utility monitor that the database administrator uses to complete each task.
Activity | Statement and function | Main function in the utility |
Create and delete | CREATE USER CREATE SYSTEM_USER DROP USER DROP SYSTEM_USER | Main function |
Grant and revoke | GRANT | |
Create, modify and | CREATE STOGROUP | Main function |
Add the first media | CREATE MEDIA DESCRIPTION | Main function |
Maintain the media | ALTER MEDIA DESCRIPTION DROP MEDIA DESCRIPTION | Main function |
Create, modify and | CREATE SPACE ALTER SPACE DROP SPACE | Main function |
Create, modify and | CREATE SCHEMA Alter a schema DROP SCHEMA | Main function Main function |
Modify properties of | ALTER CATALOG | Main function |
Table 67: SQL/utility statements and main utility monitor functions for extending and modifying the structure of a database