This page describes some ClustrixDB-specific behavior of foreign keys
Supported with Foreign Keys
ClustrixDB supports foreign keys and maintains referential integrity by default.
Unsupported with Foreign Keys
- ClustrixDB does not support the referential action SET DEFAULT.
Caveats with Foreign Keys
- ClustrixDB does not allow foreign keys with non-unique parents with referential actions CASCADE or SET NULL. When a schema with a foreign key referencing a non-unique parent is created or altered and uses CASCADE or SET NULL, ClustrixDB will provide an error message.
- ClustrixDB does not validate that foreign keys reference columns with the same data type.
- If dangling foreign key references are created when foreign_key_checks is disabled, subsequent inserts will succeed even if foreign_key_checks is enabled.
- ClustrixDB allows self-referencing foreign keys.
- ClustrixDB does not require a key length to be specified when a foreign key references a BLOB or TEXT column.
- When adding or dropping a foreign key, the reported number of rows affected does not reflect the actual number of rows.