SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
HP NonStop SQL/MX Installation and Management Guide—523723-004
7-1
7 Creating an SQL/MX Database
When you install and initialize NonStop SQL/MX on a system node, NonStop SQL/MX
creates the system catalog and several system schema. After the installation is
complete, you can create your own user catalogs and schemas. Creating a catalog
updates the system schema. The definition schema for a user catalog is created when
you create the first schema in that catalog. For more information, see Creating SQL/MX
Metadata on page 7-6.
Before you create your SQL/MX database, read:
•
Preparing to Create Your SQL/MX Database on page 7-2
•
SQL/MX Subvolume and File Naming Guidelines on page 7-2
Creating an SQL/MX database involves these basic tasks:
•
Create catalogs and schemas. See Creating Catalogs on page 7-6 and Creating
Schemas on page 7-8.
•
Understand how to assign the appropriate user access privileges for SQL/MX
objects. See Access Privileges for SQL/MX Database Objects on page 7-9
•
Create SQL/MX tables. See Creating SQL/MX Tables on page 7-11.
•
Create indexes on the tables. See Creating Indexes for SQL/MX Tables on
page 7-31.
•
Create constraints on one or more columns of a table. See Creating Constraints on
SQL/MX Tables on page 7-35.
•
Create a view of a table. See Creating Views of SQL/MX Tables on page 7-37.
•
Create triggers. See Creating Triggers on page 7-39.
•
Create stored procedures. See Creating Stored Procedures in Java on page 7-39.
•
Improve database performance in an OLTP environment. See Database Design
Guidelines for Improving OLTP Performance on page 7-39.
For information about creating an SQL/MP database and the objects in that database,
see the SQL/MP Installation and Management Guide.
Accessing an SQL/MP Database From
NonStop SQL/MX
From NonStop SQL/MX, you can run queries on an SQL/MP database located on the
same node. Such queries must conform to these guidelines:
•
Perform DML operations only. From NonStop SQL/MX, you cannot perform DDL
operations or utility operations on SQL/MP database objects. If you want to
perform DDL operations and utility operations on SQL/MP database objects, you
must do so from NonStop SQL/MP.