SQL/MX Comparison Guide for SQL/MP Users

Data Definition Language (DDL) Differences
HP NonStop SQL/MX Comparison Guide for SQL/MP Users523735-003
6-4
Tables
Tables
You create constraints on an SQL/MX table with the CREATE TABLE and ALTER
TABLE ADD CONSTRAINT statements. You create constraints on SQL/MP tables with
the CREATE CONSTRAINT statement.
Clustering Keys
You assign a clustering key for an SQL/MX table by using the STORE BY clause of the
CREATE TABLE statement. If you enter STORE BY PRIMARY KEY, NonStop SQL/MX
bases the clustering key on the primary key. The STORE BY clause determines the
order of rows in the physical file and affects how you can partition the file.
You assign a clustering key for an SQL/MP table by using the CLUSTERING KEY
clause of the CREATE TABLE statement, listing the columns that will be used for this
key. SQL/MP stores rows in ascending or descending order, as you specify. You
cannot control the order of rows in the physical file.
Table Attributes
NonStop SQL/MX allows you to set these table attributes: ALLOCATE,
AUDITCOMPRESS, BLOCKSIZE, CLEARONPURGE, EXTENT, and MAXEXTENTS.
NonStop SQL/MP allows you to set these table attributes: ALLOCATE, AUDIT,
AUDITCOMPRESS, BLOCKSIZE, BUFFERED, CLEARONPURGE, DCOMPRESS,
EXTENT, FORMAT, ICOMPRESS, LOCKLENGTH, MAXEXTENTS, NOPURGEUNTIL,
RECLENGTH, TABLECODE, and VERIFIEDWRITES.
File Types
You can access these type of SQL/MP files through NonStop SQL/MX:
Key-sequenced tables with or without partitions
Entry-sequenced tables that are not partitioned
You cannot access these type of SQL/MP files through NonStop SQL/MX:
Entry-sequenced tables that are partitioned
Relative tables
Constraints
You create constraints on SQL/MX tables with the CREATE TABLE statement, and you
can add or drop constraints with the ALTER TABLE statement. For more information,
see “SQL/MX Language Elements” in the SQL/MX Reference Manual.
To create constraints on an SQL/MP table, use the SQL/MP CREATE CONSTRAINT
statement when you create the table. To drop constraints on an SQL/MP table, use the
SQL/MP DROP statement.