SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)

Creating an SQL/MX Database
HP NonStop SQL/MX Installation and Management Guide544536-007
7-12
Security Rules for Creating and Altering SQL/MX
Tables
stored. Carefully consider the file attributes to ensure that the table meets the needs of
your application.
The CREATE TABLE statement stores the table definition in the definition schema of
the table’s catalog and creates the table, which physically exists as one or more disk
files.
All Guardian files underlying SQL/MX objects use the key-sequenced file organization
with format 2. You cannot use entry-sequenced or relative organizations with SQL/MX
tables. Before creating an SQL/MX table, you should understand the key-sequenced
type of table organizations and column, key, and index design considerations. For
more information, see Section 4, Understanding and Planning SQL/MX Tables.
For information about loading tables, see the guidelines for loading tables in
Section 10, Reorganizing SQL/MX Tables and Maintaining Data.
Security Rules for Creating and Altering SQL/MX Tables
Table security ultimately defines much of the security for indexes and views.
The rules for creating and altering tables are:
To create an SQL/MX table or other object (including index, view, SPJ, or SQL/MP
alias), you must own its schema or be a super ID user acting on behalf of the
owner.
To alter a table, you must own its schema or be a super ID user acting on behalf of
the owner.
For more information about security and access privileges for tables and other
SQL/MX database objects, see Access Privileges for SQL/MX Database Objects on
page 7-10.
Creating and Using Keys
Create and use these keys for SQL/MX tables and their indexes:
Primary key. See Creating and Using a Primary Key on page 7-13.
Clustering key. See Creating and Using a Clustering Key on page 7-13.
SYSKEY. See Using the SYSKEY on page 7-15.
Partially decoupling the clustering and partitioning keys. See Partially Decoupling
the Clustering Key and the Partitioning Key on page 7-16.
Partitioning key. See Creating and Using a Partitioning Key on page 7-15 and
Creating Indexes for SQL/MX Tables on page 7-33.
Note. To create SQL/MX tables and build an SQL/MX database, you must purchase and install
the SQL/MX DDL License product on your system. See Section 2, Preparing to Install NonStop
SQL/MX, for more information about this license.