You are on page 1of 1

1.

6 INTEGRITY RULES
 In RDBMS it is very important that the data underlying the tables be
consistent.
 Ifconsistency is compromised the data are not usable. This need has
led to formulate two integrityrules.

1.6.1 Entity Integrity


 No column in a primary key may be null. The primary key provides
the means of unique identifier of a row or an entity.
 A null value means a value that is not known, not entered, not defined
or not applicable.
 A zero or a space is not considered to be a null value.
 The RDBMS software strictly follows the entity integrity rule and does
not allow users toenter a row wihout unique value in a primary key
column. If the primary key column is null value, then it has not
enough information about the row to uniquely identify it.

1.6.2. Relational Integrity


 A foreign key value may be a null value or it must exist as a value of a
primary key in the
 referenced table.
 Oracle does not allow declaring a foreign key, if it does not exist as a
primary key in anothertable.
 It allows leaving the foreign key column value as a null.
 If a user enters a value in the foreign key column oracle cross
references the referenced
primary key column in another table to confirm the presence of the
value in that table.
 In oracle, a default value can be assigned to a column and users need
not to enter a value forthat column.

You might also like