Database Testing Interview Questions

Database Testing Interview Questions, What is Database?, Types of Database testing, Functional Database Testing, Structural Database Testing, and Non functional Database Testing.

Selenium Online Training with Project (by G C Reddy)
SQL Complete Tutorial

SQL Full Course Video

SQL Syllabus

SQL Fundamentals Quiz

SQL Queries for Software Testers

1. SQL Tutorial 1: Introduction to SQL

2. SQL Tutorial 2: SQL Overview

3. SQL Tutorial 3: SQL Environment Setup / MS SQL Server Installation

4. SQL Tutorial 4: Database Fundamentals, SQL Elements

5. SQL Tutorial 5: Data Definition Language

6. SQL Tutorial 6: Data Manipulation Language

7. SQL Tutorial 7: SQL Operators

8. SQL Tutorial 8: The Select Query

9. SQL Tutorial 9: SQL Joins

10. SQL Tutorial 10: SQL Functions

11. SQL Tutorial 11: SQL Comments

12. SQL Tutorial 12: SQL Date Functions

Top 10 Database Management Systems

SQL vs. NoSQL Databases

SQL Interview Questions and Answers for Fresher

SQL Questions Bank


Database Testing Interview Questions

1. What is Data? And how it is Importance to the Organization?

A collection of facts, Pieces of information from which conclusions may be drawn.
Example: Company Employee Data, A Country’s Population, A School’s Student Data, Etc.

2. What is Database?

The Collection of Interrelated Data is called Database.

3. What are the two important type of Databases?

i. SQL or Relational Databases

ii. NoSQL Or Non-relational Databases.

4. What is Database testing?

Database testing involves testing the behavior of the database when the application is being tested. This may involve testing to see if values are being inserted properly, flags are changing appropriately, validity of data, to ensure if data integrity is maintained. It may also account for performance related to the database. SQL queries can be fired in the database to check if the expected results are achieved.

5. What are the three types of Database Testing?

i. Structural Database Testing

ii. Functional Database Testing

iii. Non-functional Database Testing

6. What database testing basically includes?

Database testing basically include the following:
1. Data validity testing.
2. Data Integrity testing
3. Performance related to database.
4. Testing of Procedure, triggers and functions.

7. Explain about the difference between Database Testing and Functional Testing?

Database Testing is sub-set of Functional Testing and Database Testing is not only part of Functional Testing also part of Non functional Testing.

8. What is the primary role of Database Tester?

The primary role of the database tester is to see the integrity of database field values.

9. What does Database Object means?

A database object in a relational database is a data structure used to either store or reference data. The most common object that most people interact with is the table. Other objects are indexes, stored procedures, sequences, views and many more.
When a database object is created, a new object type cannot be created because all the various object types created are restricted by the very nature, or source code, of the relational database model being used, such as Oracle, SQL Server or Access. What is being created is instances of the objects, such as a new table, an index on that table or a view on the same table.

10. What are the major database object types?

Most of the major database engines offer the some set of major database object types:
• Tables
• Indexes
• Sequences
• Views
• Synonym

11. What commands does database tester generally use & whether they are given privileges to the all tables to access?

The following are the most widely used SQL statements in database testing:
1. Use Database
2. Select
3. Insert
4. Update
5. Delete
6. Drop
7. Alter
8. Modify Structure
9. Join(Inner and outer)
10. Views
11. Commit
12. Roll Back
13. Set Transition on/off
14. Envoke
15. Grant

12. What is CRUD? Explain it?

The end user mainly utilizes the ‘CRUD’ operations facilitated by the DB Tool.
C: Create – When user ‘Save’ any new transaction, ‘Create’ operation is performed.
R: Retrieve – When user ‘Search’ or ‘View’ any saved transaction, ‘Retrieve’ operation is performed.
U: Update – when user ‘Edit’ or ‘Modify’ an existing record, the ‘Update’ operation of DB is performed.
D: Delete – when user ‘Remove’ any record from the system, ‘Delete’ operation of DB is performed.

13. How to Test database in Manually? Explain with an example?

Observing that operations, which are operated on front-end is effected on back-end or not.

The approach is as follows :
While adding a record through’ front-end check back-end that addition of record is effected or not. So same for delete, update … Ex: Enter employee record in database through’ front-end and check if the record is added or not to the back-end (manually).

14. Can we conduct automated Database testing?

Yes, we can conduct automated Database testing using Selenium or UFT, etc., test tools.

15. How to check a trigger is fired or not, while doing database testing?

It can be verified by querying the common audit log where we can able to see the triggers fired.

16. How to Test Database Procedures and Triggers?

Before testing Data Base Procedures and Triggers, Tester should know that what is the Input and out put of the procedures/Triggers, Then execute Procedures and Triggers, if you get answer that Test Case will be pass other wise fail.
These requirements should get from DEVELOPER.
What we normally check for in the Database Testing?

In DB testing we need to check for,
1. The field size validation.
2. Check constraints.
3. Indexes are done or not (for performance related issues).
4. Stored procedures.
5. The field size defined in the application is matching with that in the db.

17. What is data driven test?

Data driven test is used to test the multi numbers of data in a data-table, using this we can easily replace the parameters in the same time from deferent locations.
e.g: using excel sheets.

Data driven testing has no relation with the Database Testing.

18. What is a way of writing test cases for database testing?

You have to do the following for writing the database test cases.

1. First of all you have to understand the functional requirement of the application thoroughly.

2. Then you have to find out the back end tables used, joined used between the tables, cursors used (if any), triggers used(if any), stored procedures used (if any), input parameter used and output parameters used for developing that requirement.

3. After knowing all these things you have to write the test case with different input values for checking all the paths of SP.

One thing writing test cases for back end testing not like functional testing. You have to use white box testing techniques.

19. How we do data validity testing?

Data validity testing: Testing the correctness and reasonableness of data.
Ex: Account no falling within range, numeric data being all digits, dates having valid months
Note: Data validity errors are more common and most difficult to detect.
Errors in data validity are caused by End user/ by who enters Ex: 14/20/2012

20. How we do data Integrity testing?

Date integrity is nothing but enforcing the business rules (facts/data) into database table is called data integrity.

21. What are the types of Data Integrity ?

Entity Integrity: can be achieved through Primary Key and Unique Key Constraints.
Should be tested: whether it is taking duplicate values, Whether it is taking null values.

Domain Integrity: can be achieved through Not null, Default, Check .
Should be tested: Whether it is taking default values even though if we won’t give, checking the values in the column. Ex: age column should take < 60.

Referential Integrity: can be achieved through Foreign Key.
Should be tested : Checking Whether “child” rows are deleted or not when a parent row is deleted from parent table.

22. Why back end testing is so important?

A back end is the engine of any client/server system. If the back end malfunctions, it may cause system deadlock, data corruption, data loss and bad performance. Many front ends log on to a single SQL. A bug in a back end may put serious impact on the whole system. Too many bugs in a back end will cost tremendous resources to find and fix bugs and delay the system developments.
It is very likely that many tests in a front end only hit a small portion of a back end. Many bugs in a back end cannot be easily discovered without direct testing.

23. How to conduct NoSQL Database Testing?


SQL Step by Step Tutorial – Full Course for Beginners

Follow me on social media: