1.

What Are The Integrity Constraints In Oracle?

Answer»

An integrity constraint is a declarative way to define a business RULE for a column of a table. An integrity constraint is a statement about a table’s data that is always true:

  • If an integrity constraint is created for a table and some existing table data does not satisfy the constraint, the constraint cannot be enforced.
  • After a constraint is defined, if any of the results of a DML statement violate the integrity constraint, the statement is rolled back and an error is returned.

Integrity constraints are defined with a table and are stored as part of the table’s definition, centrally in the database’s data dictionary, so that all database applications must adhere to the same set of rules. If a rule changes, it need only be changed once at the database level and not many times for each application.

The following integrity constraints are supported by Oracle:

  • Disallows nulls (empty entries) in a table’s column.
  • Disallows duplicate VALUES in a column or set of columns.
  • Disallows duplicate values and nulls in a column or set of columns.
  • Requires each value in a column or set of columns match a value in a related table’s UNIQUE or PRIMARY KEY (FOREIGN KEY integrity constraints also define referential integrity actions that dictate what Oracle should do with DEPENDENT data if the data it REFERENCES is altered).
  • Disallows values that do not satisfy the logical expression of the constraint.

An integrity constraint is a declarative way to define a business rule for a column of a table. An integrity constraint is a statement about a table’s data that is always true:

Integrity constraints are defined with a table and are stored as part of the table’s definition, centrally in the database’s data dictionary, so that all database applications must adhere to the same set of rules. If a rule changes, it need only be changed once at the database level and not many times for each application.

The following integrity constraints are supported by Oracle:



Discussion

No Comment Found