Database Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 10803 Page Views: 

Explain Data Integrity?



Posted By: Avi Date: 7 October 2009 04:43:37 AM
 Answer:

Data integrity means the correctness and consistency of data. Enforcing data integrity ensures the quality of the data in the database. Consider following two examples of data integriry in a database:
1) If an employee is entered with an employee_id value of 123, the database should not allow another employee to have an ID with the same value.
2) If you have an employee_rating column intended to have values ranging from 1 to 5, the database should not accept a value of 6.

Data integrity can be categorized under following four categories:

1) Entity Integrity:
Entity integrity defines a row as a unique entity for a particular table. Entity integrity enforces the integrity of the identifier column(s) or the primary key of a table.

2) Domain Integrity:
Domain integrity is the validity of entries for a given column. You can enforce domain integrity by restricting the type, the format, or the range of possible values for a table column.

3) Referential Integrity:
Referential integrity preserves the defined relationships between tables when records are entered or deleted. Referential integrity ensures that the key values are consistent across tables. Such consistency requires that there be no references to nonexistent values and that if a key value changes, all references to it change consistently throughout the database.

4) User-Defined Integrity:
User-defined integrity allows you to define specific business rules that do not fall into one of the other integrity categories. All of the integrity categories support user-defined integrity.


Posted By: eTechPlanet


Date: 7 October 2009 04:43:37 AM

Accuracy and consistency of stored data, indicated by an absence of any alteration in data between two updates of a data record. Data integrity is imposed within a database at its design stage through the use of standard rules and procedures, and is maintained through the use of error checking and validation routines.
Exact duplication of the sent data at the receiving end, achieved through the use of error checking and correcting protocols.


Posted By: Daniel


Date: 16 February 2010 03:45:46 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image y8uVLw
Related Questions
Database : Differentiate between SQL and PL/SQL?

Differentiate between SQL and PL/SQL?

1. SQL is simpleified statement for Selecting and Manipulating the data. Whereas PL/SQL is a Procedu....
Category: Database Date: 10/1/2010 12:24:08 PM
Database : What is ACID property?

What is ACID property?

ACID is the acronym for Atomicity,Consistency,Isolation and Durability. Whenever a transaction is ex....
Category: Database Date: 10/1/2010 11:46:07 AM
Database : How are one-to- one,one to many and many to many relationships implemented while designing the table?

How are one-to- one,one to many and many to many relationships implemented while designing the table....

1. One to one relationship:- This is the relationship which is used very rarely and is implemented o....
Category: Database Date: 10/1/2010 11:39:07 AM
Database : What is meant by RDBMS?

What is meant by RDBMS?

RDBMS means Relational Database Management System.This system manages the data records and indices i....
Category: Database Date: 10/1/2010 11:14:20 AM
Database : What is the difference between OLTP & OLAP?

What is the difference between OLTP & OLAP?

OLTP:- 1. It is based on entity relational model. 2. It inherits the concept of normalization so the....
Category: Database Date: 10/1/2010 11:14:07 AM