DATA INTEGRITY
Posted by merveolamli on September 3, 2007
In the applications, we want to prevent insertion, manipulation or deletion of invalid data to satisfy data integrity. So, to provide acceptable information, we have to apply some rules.
Data integrity is helpful for enforcing types of rules associated with the database. For instance, validity of data, manipulation and navigation of data in the tables correctly. Let’s explain the rules applied to table columns for data integrity.
First one is Null Rule, which is defined on a single column and controls if the value in this column can contain null values while insertion or deletion. Second one is Unique Column Rule, it can be defined on one or more columns. It controls if the column (s) contain unique values. According to this rule, values of these columns can contain null values. The Third one is Primary Key Rule, that is defined as a key value on a column or set of columns. It satisfies each row in the table can be uniquely defined. The difference to the Unique Column Rule is, none of the values can contain null values in Primary Key Rule. The other one is Referential Integrity Rules which are used frequently. The definition for this rule is the necessity of existence of a column or set of columns also in the referenced table. It controls the data manipulations on the referential values. The last one is Complex Integrity Checking. This is a user defined rule that checks insertion, deletion and update operations on a column or more than one columns.
Oracle enforces data integrity by definitions. Integrity constraints and triggers help these rules to be applied to the database.