This section describes the SQL objects which can be addressed using SQL statements.
“SQL objects” is a collective term for all the elements of a database that can be created using SQL statements and, with the exception of privileges (see "Access protection based on privileges in SQL"), can also be named using SQL statements.
This section deals with the following SQL objects:
SESAM/SQL database/(catalog)
Space
Storage group
Schema
Table
Column
Integrity constraints
Index
Routines (procedures and User Defined Functions (UDFs))
BLOB constructs
The figure 7 illustrates the relationships between a number of fundamental SQL objects for the demonstration database ORDERCUST (see "Structure of the SESAM/SQL server documentation"):
The metadata of the ORDECUST database contains the ORDERPROC schema. The user can access parts of the metadata via the schema INFORMATION_SCHEMA. The ORDERPROC schema contains the definition of the CUSTOMERS table. The user can specify where the tables containing the user data are to be created (in which user space or BS2000 file). The metadata is located in the catalog space. The CUSTOMERS table is created in the TABLESPACE and the index IND_CUST_INFO is created in the INDEXSPACE. User spaces and the catalog space can in turn be assigned to storage groups, which group together the physical storage media on which the space files are created. TABLESPACE and INDEXSPACE are assigned to the storage group STOGROUP1 and the catalog space is assigned to the storage group STOGROUP2.
Figure 7: Example of a SESAM/SQL database