SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
5 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 the “Creating SQL/MX Metadata” (page 76).
Before you create your SQL/MX database, read:
• “Preparing to Create Your SQL/MX Database” (page 73)
• “SQL/MX Subvolume and File Naming Guidelines” (page 73)
Creating an SQL/MX database involves these basic tasks:
• Create catalogs and schemas. See “Creating Catalogs” (page 77) and “Creating Schemas”
(page 78).
• Understand how to assign the appropriate user access privileges for SQL/MX objects. See
“Access Privileges for SQL/MX Database Objects” (page 79)
• Create SQL/MX tables. See “Creating SQL/MX Tables” (page 80).
• Create partitions for the SQL/MX tables. See “Creating and Managing Partitions for SQL/MX
Tables” (page 83).
• Create indexes on the tables. See “Creating Indexes for SQL/MX Tables” (page 96).
• Create partitions for SQL/MX indexes. See “Creating and Managing Partitions for SQL/MX
Indexes” (page 98).
• Create constraints on one or more columns of a table. See “Creating Constraints on SQL/MX
Tables” (page 99).
• Create a view of a table. See “Creating Views of SQL/MX Tables” (page 101).
• Create triggers. See “Creating Triggers” (page 102).
• Create stored procedures. See “Creating Stored Procedures in Java” (page 102).
• Improve database performance in an OLTP environment. See “Database Design Guidelines
for Improving OLTP Performance” (page 103).
For more information, see the SQL/MP Installation and Management Guide.
Preparing to Create Your SQL/MX Database
Before you begin to create your SQL/MX database, first plan the database and define its layout
as described in “Understanding and Planning SQL/MX Tables” (page 29). Also plan your security,
TMF requirements, RDF requirements, and recovery mechanisms as described in “Planning Database
Security and Recovery” (page 42).
After you create the database, you can load the data into the SQL/MX tables, compile your
application programs, and start running your applications. For more information, see “Managing
Database Applications” (page 212).
SQL/MX Subvolume and File Naming Guidelines
Before you build your SQL/MX database, familiarize yourself with the rules for naming SQL/MX
subvolumes and files. These rules are always followed when NonStop SQL/MX generates file
names and are enforced by NonStop SQL/MX for user-specified names. These rules are in addition
to Guardian naming rules already enforced by the Guardian file system.
Preparing to Create Your SQL/MX Database 73










