Database-level constraints specify a functional determinant between the key and its dependent attributes and the functional determinants among two or more tables (see Inclusion Compatibilities).
The most commonly observed database-level constraint between tables is the primary key-foreign key relationship whose enforcement is called maintaining referential integrity. This constraint specifies that you cannot delete a row having primary key value x from table X if any foreign key value in table Y has value x on the column set that defines the referential integrity relationship between those columns in tables X and Y. That is, if you have foreign key value x, then you must also have primary key value x if referential integrity is defined for those keys and tables.
The specific table-level constraint syntax used to define the common PK-FK referential integrity constraint is FOREIGN KEY (referencing_column_set) REFERENCES referenced_table_name (referenced_primary_key_column_name_set).
You can also specify and enforce database-level constraints on non-PK-non-FK column relationships if the columns defining those relationships are alternate keys.
The specific constraint used to define an alternate key referential integrity constraint is a foreign key constraint with column-level syntax REFERENCES table_name alt_key_name and table-level syntax FOREIGN KEY (referencing_column_set) REFERENCES referenced_table_name (referenced_alt_key_name), where alt_key_name refers to an alternate key column set in the parent table.
The database-level constraints for your databases are developed from the ATM Constraints form.
You cannot declare database-level CHECK constraints on any column defined with XML, BLOB, CLOB, Period, or JSON data types.
You cannot specify constraints other than NULL or NOT NULL for global temporary trace tables (see CREATE GLOBAL TEMPORARY TRACE TABLE ).