blogs

What is Data Integrity & How to Enforce it in a Database?

What is Data Integrity & How to Enforce it in a Database? 20 Aug,2018

Data Integrity resembles an umbrella that refers to the accuracy, consistency, and correctness of data stored in a database. Data integrity is not about physical security, fault tolerance, or data preservation (backups). One can also think of data integrity in terms of an old objective as: ‘garbage in, garbage out’. Data integrity is all about keeping the garbage data out. Data integrity refers to the correctness and completeness of data with respect to a database. A user can insert, update or delete the values in a Database and in order to restrict or constraint the user’s data integrity can be enforced. For example: Numeric columns/cells in a table should be restricted to accept alphabetic data.

Database Integrity is a central underlying aspect or term in the implementation of database technology. Having faith in the data correctness is a prerequisite for using the data in business, research or decision-making applications. So it’s for sure that the factors of ensuring database security and reliability cannot be ignored. One also has to consider the use of error checking and correction codes to deal with the integrity issues and improve the performance of database systems.

For example, the integrity of data in the EMP01 and EMP02 databases requires that the book title in the titles table should have a publisher in the publisher table. If one selects insert books which with a valid publisher into tables it will for sure violate the data integrity of EMP01 and EMP02 databases.

Enforcing Data Integrity in Databases

Basically, there are four primary types of data integrity: entity, domain, referential and user-defined.

Entity integrity applies at the row level; domain integrity applies at the column level, and referential integrity applies at the table level.

1. Entity Integrity ensures a table does not have any duplicate rows and is uniquely identified.

2. Domain Integrity requires that a set of data values fall within a specific range (domain) in order to be valid. In other words, domain integrity defines the permissible entries for a given column by restricting the data type, format, or range of possible values.

3. Referential Integrity is concerned with keeping the relationships between tables synchronized.

4. User-defined Integrity refers to specific business rules not covered by the other integrity categories. It is typically implemented through triggers and stored procedures. Data integrity is enforced by features such as check constraints, triggers, views, stored procedures, user-defined functions, and/or referential constraints.

Advantages of Data Integrity Constraints

Some of the advantages of enforcing integrity constraints are:

1. Enforcing business rules in the code of a database application.

2. Stored procedures can be used with ease in order to completely control access of data.

3. The Enforcement of business rules can be done easily with triggered stored database procedures.

Maintaining Integrity of the data is a cornerstone function of the DBMS. Integrity constraints that the DBMS maintains are the business rules that are defined by the enterprise. The DBMS should have the capability to enforce data integrity for all the applications that use the data.

Data integrity rules defined centrally in the database is independent of the applications that use the database. When data integrity is implemented directly in the database, the application developer does not need to worry about coding of all the data integrity features directly into the application. Potential problems associated with coding data integrity into the application are:

  • Additional programming required
  • Inconsistencies and potential errors
  • It is difficult to make changes
  • Weaker security (i.e. it is easier to bypass)

 

We, at BugRaptors, during the testing of Data integrity enforcement makes sure that Data integrity is enforced by features such as check constraints, triggers, views, stored procedures, user-defined functions, and/or referential constraints. We at BugRaptors, also perform data integrity testing by keeping in mind all the positive and negative scenarios in order to cover all the business requirement rules.

 

Sharad Yadav works as a Consultant QA at Bugraptors. He is having multidimensional skills with respect to Manual testing, Mobile application testing, Game testing, Compatibility testing, Smoke testing, Responsive Testing, Sanity testing and Regression testing. He is also having expertise in preparation, development and execution of Test cases, Test procedure specifications and Test summary reports etc.

Leave a Reply

Your email address will not be published. Required fields are marked *

Name field is required !

Related Posts

What Role Does Predictive Analytics Play In Software Testing...
What is Data Integrity & How to Enforce it in a Database?

Ever wanted to predict the possible problems in your project even before their occurrence? Want to know what you should do to optimize your process? ...

Read More
How Industry 4.0 Can Harness The Power of Quality Assurance?
What is Data Integrity & How to Enforce it in a Database?

We are living in an era of digital transformation. The whole transformation was brought about when the analog information was converted into digital d...

Read More
How To Achieve Great UX With The Help of QA?
What is Data Integrity & How to Enforce it in a Database?

Achieving great UX is not just about the right planning & prototyping. It is also about the way you test your design for all types of flaws you ca...

Read More
Advantages To Outsource QA Software Testing
What is Data Integrity & How to Enforce it in a Database?

The increasing demand for quality software system applications forces enterprises to stay up with correct testing activities. Outsourcing may be used ...

Read More

Popular Blogs

What Role Does Predictive Analytics Play In Software Testing?
What Role Does Predictive Analytics Play In Software Testing? Read More
How Industry 4.0 Can Harness The Power of Quality Assurance?
How Industry 4.0 Can Harness The Power of Quality Assurance? Read More
How To Achieve Great UX With The Help of QA?
How To Achieve Great UX With The Help of QA? Read More
Advantages To Outsource QA Software Testing
Advantages To Outsource QA Software Testing Read More
Test Automation – Boosting Industrial Growth with Innovation
Test Automation – Boosting Industrial Growth with Innovation Read More

Sign up FOR NEWSLETTER !

Consult our Experienced Team of Testers for Your QA Requirements!
contact us