SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Creating an SQL/MX Database
HP NonStop SQL/MX Installation and Management Guide—523723-004
7-6
Creating SQL/MX Metadata
For details and examples, see the information about MODIFY in the SQL/MX
Reference Manual.
Creating SQL/MX Metadata
NonStop SQL/MX creates system metadata and user metadata tables that maintain
records of the information that defines SQL/MX objects and track the use of those
objects by other SQL/MX objects.
When NonStop SQL/MX is installed and initialized on a node, the system catalog,
NONSTOP_SQLMX_nodename, and its schemas are automatically created. These
metadata schemas are:
•
SYSTEM_SCHEMA schema, which contains the five system schema tables used
for catalog reference and recording catalog and schema information.
•
SYSTEM_DEFAULTS_SCHEMA schema, which contains the default settings for
options and other attributes used with MXCI commands and SQL/MX statements.
•
MXCS_SCHEMA schema, which contains the metadata information needed by
MXCS.
•
SYSTEM_SQLJ_SCHEMA, which contains the stored procedure
VALIDATEROUTINE.
•
DEFINITION_SCHEMA_VERSION_version schema, which contains the
definition schema tables used to maintain information about SQL/MX objects. A set
of these tables is created specifically for the system catalog.
A set of definition schema tables is also created for each user catalog when you create
the first schema for that catalog. As you add more schemas and objects to the catalog,
these definition schema tables are updated to describe them.
You can use SELECT to view the contents of SQL/MX metadata tables, but only the
super ID user can modify their content. For example, only the super ID user can
perform ALTER, DROP, DELETE, INSERT or UPDATE statements on metadata tables.
For more information about the SQL/MX system and user metadata tables, see the
SQL/MX Reference Manual.
Creating Catalogs
You begin building your SQL/MX database by creating user catalogs. A catalog:
•
Is the named logical object that contains descriptions of a set of schemas.
•
Is owned by the authorization ID that creates the catalog, but this authorization ID
has no special capabilities other than the ability to register or unregister the
catalog.
•
Can contain multiple schemas, each of which can be owned by a different user.