Database Testing questions for interview
Interview QA

Database Testing Questions For Interview

Here are 15+ Database Testing Question for interview

Q.1. What is Database testing?

Ans.Database testing/backend testing is the process of validating the impact of backend database operations on frontend web/desktop applications.

This falls into different categories:

  • Data Validity Tests: These tests require testers to have a good knowledge of SQL queries.
  • Data Integrity Tests: During these tests, testers/developers should be aware of referential integrity and various constraints.
  • Database performance tests: During these tests, the tester/developer has to design the structure of the tables well.
  • Test Procedures, Triggers, and Functions: During these tests, testers/developers should have a thorough understanding of test procedures, triggers, and functions.

Q.2. Why database testing is important?

Ans.We all know that a database is not like a small table, but in reality it is a big container full of many tables and data, serving many web/desktop applications at the same time. I’m here.
A database testing process ensures that accurate and clean data (no errors) is delivered to the right place. These errors can lead to serious problems such as deadlocks, data corruption, performance degradation, and inconsistencies.

Q.3. What do we test in the Database Testing ?

Ans. Database testing requires detailed knowledge and a more defined approach to testing data for specific applications.

This testing process typically includes:

  • Field size validation
  • limit.
  • Whether the index is created (for performance related issues)
  • stored procedure
  • The array size defined in the application matches the array size in the DB.

Q.4. Can you test the database manually? Give an example.

Ans.You have to observe the working behavior. Observe front-end operations and their impact on the back-end database. When adding a record (XYZ) from the frontend to the backend database, manually check if the record in the backend database is affected. Similarly, it works for deletes, updates, etc.
For example, to keep a record of students taking exams, you enter student details from your front-end system and manually check the impact of this addition on your back-end database.

Q.5. What does data-driven testing mean?

Ans. Data-driven testing is the term used for a testing process where a test script reads test data and extracts values ​​from data files (data pools, Excel files, ADO objects, CSV files, ODBC sources). Same hard-coded value every time. This test helps the tester validate the efficiency of the application in handling various inputs.

Q.6. What are database triggers? How can I check if the trigger has fired and if necessary call the trigger?

Ans.Database Triggers are basically stored procedures used to maintain the integrity of data residing in the database. Automatically executed to respond to certain events on tables/views in the database.
To see if the trigger was triggered; to view the data table triggers, use a common audit log query. Triggers cannot be called on demand. A trigger is invoked when an action (INSERT, DELETE, UPDATE) defined on a particular table appears on the table.

Q.7. What is the meaning of the records in the database?

Ans. In a database, a record is a set of values/fields for a particular entity.

Q.8 What do you understand by RDBMS and explain variousRDBMS in SQL?

Ans. RDBMS stands for Relational Database Management System. Major RDBMSs related to SQL include Sybase, Oracle, Access, Ingres, and Microsoft SQL Server.

Q.9.Describe performance testing and its bottlenecks.

Ans. Performance testing is a software testing technique for determining system performance in terms of speed, sensitivity, and stability under heavy workloads. Running this test requires expensive tools and well-trained and experienced testers.

Q .10.Explain the various SQL statements ?

Ans. The following SQL statements can be used for database testing:

(i) DDL (Data Definition Language): All relevant statements can be used when defining a database structure or schema.
Example: CREATE, ALTER, DROP, TRUNCATE, COMMENT, and RENAME

(ii) DML (Data Manipulation Language): You can use all relevant statements to manage data in schema objects.
Example: SELECT, INSERT, UPDATE, DELETE, MERGE, CALL, EXPLAIN PLAN, and LOCK TABLE.
(iii) Data Control Language (DCL).Example GRANT and REVOKE

(iv) TCL (Transaction Control Language): All associated directives can be used to manage changes made by DML directives. TCL allows statements to be combined into logical transactions.
Example: COMMIT, SAVEPOINT, ROLLBACK, SET TRANSACTION.

Q.11. What are joins? Explain different types of joins?

Ans. Use joins to combine two or more tables and display them as a single record.

Below are the types of Joins:

Inner Join
Outer Join
Left Join
Right Join

Q.12. What do you mean by index and what are the different types of indexes?

Ans.Create an index on the columns of a table in order to retrieve data more quickly and efficiently, thus speeding up searches and queries.

The different types of indexes are:

B-Tree index
Bitmap index
Clustered index
Covering index
Non-unique index
Unique index

Q.13. What do you mean by DBMS?

Ans. A structured data set constitutes a database.A database management system (DBMS) is a computer software application that creates a communication network between users, other applications, and databases to store, modify, and retrieve information from databases. Well-known DBMSs are My SQL, Postgre SQL, Microsoft SQL Server, Oracle, SAP, and IBM DB2.

Q.14.What does DML mean?

Ans: Data manipulation Languages​​(DML)are a family of computer programming languages​​that facilitate selecting,inserting,deleting, and updating data in databases. DML basically includes Structured Query Language (SQL) that allows users to easily retrieve and use data from relational databases.

Q.15. What do you understand by DCL commands and explain types of DCL commands ?

Ans. Data Control Language (DCL) is a component of SQL that controls the use of data stored in databases. There are two types of DCL commands: Grant: This command gives users easy access to database privileges Revoke: Do not allow user access to database.

Q.16. In database testing, what do you need to write good test cases?

Ans. Before writing database test cases, you should know the following:

Thoroughly understand the application and also understand the functional requirements of the application.

In your application, such as connections between backend database tables, tables, cursors (if any), triggers (if any), stored procedures (if any), input parameters, and output parameters to develop these requirements. See other entities used.

After gathering all the necessary information, write down test cases with different input values ​​to explore all resources.

Creating test cases for back-end testing is the opposite of functional testing. You should use white-box testing techniques.

Q.17. What are the tester scenarios for testing a migrated database from one SQL server to another?

Ans. First of all you need to make sure all the improvements and changes happened to the SQL server you want to migrate. Then design your test cases according to the following reasoning:

Data type used.

The SQL Server data field length (the server you are migrating data to) should match the SQL server you are getting the data from.

Properly organize each task.

https://indiatraveltip.blogspot.com/2021/04/bikaner-unexplored-city-in-rajasthan.html

https://www.softwaretestingleaders.com/

3 Replies to “Database Testing Questions For Interview

Leave a Reply