What is a Data Integrity rule Give some examples illustratin

What is a Data Integrity rule? Give some examples illustrating your answer. Why would we use them?

Solution

Data integrity is referred as one of the fundamental concept for the database . Data integrity gives the accuracy and consistency of the data in the database or data warehouse.

Data integrity specifies the constraints that how the data should be entered into the database. It gives the quality of the data and it takes only the revelent data specific to the context.

Data integrity rules are of different types which each rule poses one different contraint inorder to ensure the adiquate data is storing in the database. Some rules are null values, primary key values, unique values like this.

Examples:-

If you try to give the null value to any field which implemented with null constraint it gives an error.

If you try to give the same value which is already there in database like id no it doesn\'t take as it violates unique constraint.

If you leave null or copy value in the any field in column which is primary key column then it throws the exception.

Like this if you try to violate the data integrity constraints then it immediately throws an error and asks for the exact information other wise it doesn\'t take input.

Why would use data integrity:-

Data integrity rules are very much useful in maintaining the accuracy and efficiency of data in the database. Because of this data integrity rules the exact required information Will be taken i e. By not accepting the null values and non unique values etc.

These are very much useful to take only the organization useful information without accepting unrelevent data so that the accuracy of the information is maintained.

What is a Data Integrity rule? Give some examples illustrating your answer. Why would we use them?SolutionData integrity is referred as one of the fundamental c

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site