Deferred constraints are constraints that are checked only when a transaction is committed. If any constraint violations are detected at commit time, the entire transaction is rolled back. These constraints are most useful when both the parent and child rows in a foreign key relationship are entered at the same time, as in the case of an order entry system, where the order and the items in the order are entered at the same time. A constraint that is defined as deferrable can be specified as one of the following: Initially immediate specifies that by default it should function as an immediate constraint, unless explicitly set otherwise. Initially deferred specifies that by default the constraint should only be enforced at the end of the transaction. ANSWER 4: Use the SET CONSTRAINTS statement to make constraints either DEFERRED or IMMEDIATE The ALTER SESSION statement also has clauses to SET CONSTRAINTS to DEFERRED or IMMEDATE The SET CONSTRAINTS statement makes constraints either DEFERRED or IMMEDIATE for a particular transaction.
You've reached the end of your free preview.
Want to read all 8 pages?
- Spring '18
- Constraints, administrator, Database management system, Constraint