Database Reference
In-Depth Information
In this example we have assigned a unique constraint on dname
column. We have also used the CONSTRAINT clause to assign
this constraint a name.
Figure 2-16: Data Integrity Constraints or simply Constraints. Oracle
Instance verifies constraints before accepting any value from user. Each
value in the Primary Key column is a unique identifier for the whole
record/row or in other words, no duplicate or NULL values are allowed
in Primary key constraint column. Oracle creates an implicit index for a
column having Primary key constraint on it. Index helps in speeding up
the search process just like the index at the end of a topic. Referential
Integrity constraint also known as PRIMARY/FOREIGN KEY
relationship between two or more tables results in two thing: (1)
Cannot delete any record from parent table with related PRIMARY
KEY column value in child table's FOREIGN KEY column unless we
use ON DELETE CASCADE clause. (2) Cannot update/insert anything
in child's table FOREIGN KEY column with no corresponding value
in parent table PRIMARY KEY column
 
Search WWH ::




Custom Search