Software Testing | Database Testing

Database Testing is a type of software testing that checks the schema, tables, triggers etc. of the database under test. It involves creating complex queries for performing the load or stress test on the database and check its responsiveness. It checks integrity and consistency of data.

Database testing usually consists of a layered process that includes the User Interface (UI) layer, the business layer, the data access layer and the database.

Objective of the Database Testing:

  1. Ensure Data Mapping:
    It checks whether the fields in the user interface or front end forms are mapped consistently with the corresponding fields in the database table.
  2. Ensure ACID Properties of Transactions:
    Every transaction a database performs has to stick to these four properties: Atomicity, Consistency, Isolation and Durability.
  3. Ensure Data Integrity:
    The updated and the most recent values of shared data should appear on all the forms and screens. The value should not be updated on one screen and display an older value on another one. The status should also be updated simultaneously.
  4. Ensure the Accuracy of the Business Rules:
    Complex databases leads to complicated components like relational constraints, triggers and stored procedures. Hence in order testers come up with appropriate SQL queries to validate the complex objects.

Database Testing Attributes:

  1. Transactions:
    Transactions means the access and retrieve of the data. Hence in order during the transaction processes the ACID properties should be followed.
  2. Database Schema:
    It is the design or the structure about the organization of the data in the database.
  3. Triggers:
    When a certain event occurs in a certain table, a trigger is auto-instructed to be executed.
  4. Procedures:
    It is the collection of the statements or functions governing the transactions in the database.

Database Testing Process:




  1. Test Environment Setup:
    Database testing starts with the setting up the testing environment for the testing process to be carried out in order get a good quality testing process.
  2. Test Scenario Generation:
    After setting up the test environment test cases are designed for conducting the test. Test scenario involve the different inputs and different transactions related to database.
  3. Execution:
    Execution is the core phase of the testing process in which the testing is conducted. It is basically related to the execution of the test cases designed for the testing process.
  4. Analysis:
    Once the execution phase is ended then all the process and the output obtained is analyzed. It is checked whether the testing process has been conducted properly or not.
  5. Log Defects:
    Log defects are also known as report submitting. In this last phase tester informs the developer about the defects found in the database of the system.

Misconceptions related to Database Testing:

  • It requires experts to carry out database testing
  • The process of database testing is lengthy
  • It adds extra work bottlenecks
  • It slows down the overall development process
  • It is a highly costly process


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.