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-8
Reserved Catalogs
metadata. For more information, see Section 13, Managing an SQL/MX Distributed
Database.
Reserved Catalogs
Catalog names beginning with NonStop_SQLMX_ are reserved for the first part of the
schema names and metadata tables that reside in the system catalog. You are not
allowed to create or drop catalogs with these reserved names.
Creating Schemas
After you have created a catalog, you can begin to create its schemas.
A schema is a named collection of SQL/MX database objects, including tables, views,
indexes, and so forth. Each object is described in exactly one schema, although an
object can refer to objects that are described in other schemas. A schema cannot
contain other schemas.
Schema Naming
The schema name is an SQL identifier that represents the second part of the three-part
ANSI name of the form catalog.schema.name. The schema’s SQL identifier must
be unique within the catalog. NonStop SQL/MX automatically qualifies a schema name
with the current default catalog name unless you explicitly specify a catalog name with
the schema name. For example:
cat2.schema2
For more information about schema naming, see the SQL/MX Reference Manual.
Rules for Creating and Dropping Schemas
•
A schema is the unit of object ownership. The person who creates a schema is the
owner of that schema and all the objects in that schema.
•
Only the super ID user can both create a schema and specify any valid
authorization ID as the schema owner.
•
Only the super ID user or the schema owner can create and drop objects in that
schema.
Examples for Creating Schemas
This example creates a user schema that is owned by the regular user who creates it.
CREATE SCHEMA mycat.myschema;