SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.2 Reference Manual691117-001
2-124
Considerations for CREATE TABLE
SQL/MX Extensions to CREATE TABLE
This statement is supported for compliance with ANSI SQL:1999 Entry Level. SQL/MX
extensions to the CREATE TABLE statement are [NOT] DROPPABLE, ASCENDING,
DESCENDING, STORE BY, LOCATION, PARTITION, ATTRIBUTE, and LIKE clauses.
Considerations for Referential Integrity
Circular Dependency
The following situations cause circular dependency when adding a Referential Integrity
(RI)/Trigger:
A situation where the UPDATE/DELETE/INSERT operations on the table being
modified invoke RI(s)/trigger(s), thereby re-invoking the same RI/trigger with the
same operation as the RI/trigger invoked earlier. This is an example of a circular
dependency situation, which does not allow you to create this RI/trigger.
Exception: If the circular dependency path consists of only triggers, the situation is
not considered circular dependency for the reasons of backward compatibility.
A situation where a few tables are interconnected by RIs, such that the referencing
columns of one RI are the same as the referenced columns of another RI. This is
another example of a circular dependency situation, which does not allow you to
create this RI.
Conflicting and Duplicate Constraints
A referential integrity constraint that is created with new RI actions can conflict or be a
duplicate of the already existing columns.
Conflicting Constraints
The two constraints in a table conflict if the referenced table is the same and the
referencing columns overlap or
The two constraints of a table conflict if the referenced table and the referencing
columns are the same and are in the same order, but the RI actions are different.
Duplicate Constraints
The two constraints of a table are said to be duplicate if the referenced table and the
referencing columns are in the same order and the RI actions are the same.
If the existing RI actions for both the update and delete rule are NO
ACTION/RESTRICT, and if the newly added RI constraint also has RI actions NO
ACTION/RESTRICT for both the update and delete rule, they are not said to be
duplicate or conflicting. This is to support backward compatibility.