Professional Documents
Culture Documents
Constraints Definition
Constraints Definition
Constraints enforce rules at the table level, constraints prevent the deletion of a table if there are
They are stored in the data dictionary. They can be defined either table level or column level.
The following constraints types are valid:
----not null
----unique
----primary key
----foreign key
----check
1) not null constraint Definition:
If not null constraint defined on a column it will restrict the null values.
This constraint is used to define a relation between 2 tables called as entity relation or parent-chi
If a parent-child relation is defined, then the values which are not existing in the parent column w
Into the child column.
add
Adding Constraints
Enabling Constraints
Disabling Constraints
Dropping Constraints
Viewing Constraints:
User_constraints table to view all constraint definitions and names
Referential Integrity:
Maintaining data integrity through a set of rules that restrict the values of
one or more columns of the tables based on the values of primary key or
unique key of the referenced table.