Latest Questions
Post Top Ad
Your Ad Spot
Tuesday, June 18, 2019

30 Top Database Testing Interview Questions and Answers {Updated}

Database Testing Interview Questions and Answers for experienced PDF, Read commonly asked Database Testing Job Interview Questions with Answers PDF for Freshers.


Read Database Testing Interview Questions and Answers

How do SQL queries will affect the performance of the application?
Yes, SQL queries make a lot of impact on the whole performance of the application. A poorly written SQL query by a developer can take a long time to generate a report or retrieve data from the database. So, we need to take a few precautions while writing queries, as a database tester I will also review the queries written by a developer. For example: get rid of nested SQL queries as much as possible and make use of joins.

How can you retrieve unique rows from a table?
I can do that by using a DISTINCT keyword in my SQL query. eg: select DISTINCT * from products where product_category = ‘Electronics’;

What are the different types of Join conditions in SQL?
Inner Join, Outer Join, Left outer join, Right outer join. And try to explain each of them if he gives time.

Provide an example of what can be manually tested in a database.
Non-editable fields through the database can be tested manually. For example, a field that is non-editable through the front end, should not allow a user to add a record to the database.

What is typically checked during database testing?
The following items are typically checked during database testing:
Validation of field size (application matches what resides in the database)
Constraints
Indexes (associated with performance related issues)
Stored procedures

How should test cases be written for database testing?
Test cases for database testing should include the following information: project name, module name, bug ID number, test objective, steps/actions, expected results, actual results, status, a priority of defect, and severity of the defect.

What is used to check data loading during database testing?
Query analyzer can be used to check data loading. 3.

Which SQL statements have you used for testing databases?
This is a basic interview question used to determine your experience with using SQL and databases. Simply provide enough information to adequately display your knowledge of these items.

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.

What is the way of writing test cases for database testing?
Database testing basically includes the following.
1)Data validity testing.
2)Data Integrity testing
3)Performance related to the database.
4)Testing of Procedure, triggers, and functions.
for doing data validity testing you should be good in SQL queries
For data integrity testing you should know about referential integrity and different constraint.
For performance related things you should have an idea about the table structure and design.
for testing Procedure triggers and functions you should be able to understand the same.

How to test data loading in Database testing?
You have to do the following things while you are involving in Data Load testing.
1. You have known about source data (table(s), columns, datatypes, and Constraints)
2. You have to know about Target data (table(s), columns, datatypes, and Constraints)
3. You have to check the compatibility of Source and Target.
4. You have to Open corresponding DTS package in SQL Enterprise Manager and run the DTS package (If you are using SQL Server).
5. Then you should compare the column’s data of Source and Target.
6. You have to check the number to rows of Source and Target.
7. Then you have to update the data in Source and see the change is reflecting in Target or not.
8. You have to check about junk character and NULLs.

What SQL statements have you used in Database Testing?
The most important statement for database testing is the SELECT statement, which returns data rows from one or multiple tables that satisfies a given set of criteria.
You may need to use other DML (Data Manipulation Language) statements like INSERT, UPDATE and DELETE to manage your test data.
You may also need to use DDL (Data Definition Language) statements like CREATE TABLE, ALTER TABLE, and DROP TABLE to manage your test tables.
You may also need some other commands to view table structures, column definitions, indexes, constraints, and stored procedures.

what is database testing and what we test in database testing?
Database testing is all about testing joins views, imports, and exports, testing the procedures, checking locks, indexing, etc. It's not about testing the data in the database.
Usually, database testing is performed by DBA.

How to use SQL queries in WinRunner/QTP in QTP
using the output database checkpoint and database checkpoint,
select SQL manual queries option
and enter the “select” quires to retrieve data in the database and compare the expected and actual

What are the different stages involved in Database Testing
verify field level data in the database with respect to front-end transactions
verify the constraint (primary key, foreign key ….)
verify the performance of the procedures
verify the triggers (execution of triggers)
verify the transactions (begin,commit,rollback)

What steps does a tester take in testing Stored Procedures?
First, the tester should go through the requirement, as to why the particular stored procedure is written for.
Then check whether all the required indexes, joins, updates, deletions are correct comparing with the tables mentions in the Stored Procedure. And also he has to ensure whether the Stored Procedure follows the standard format like
comments, updated by, etc.
Then check the procedure calling name, calling parameters, and expected responses for different sets of input parameters.
Then run the procedure yourself with database client programs like TOAD, or MySQL, or Query Analyzer
Rerun the procedure with different parameters, and check results against expected values.
Finally, automate the tests with WinRunner.

How do you test whether the database is updated as and when information is added in the front end? Give me an example?
It depends on what level of testing you are doing. When you want to save something from front end obviously, it has to store somewhere in the database
You will need to find out the relevant tables involved in saving the records.
Data Mapping from front end to the tables. Then enter the data from the front end and save.
Go to the database, fire queries to get the same date from the back end.

How do you test whether a database is updated when information is entered in the front end?
It depends on your application interface.. 1. If your application provides view functionality for the entered data, then you can verify that from front end only. Most of the time Black box test engineers verify the functionality in this way. 2. If your application has only data entry from the front end and there is no view from the front end, then you have to go to Database and run the relevent SQL query. 3. You can also use the database checkpoint function in WinRunner.

How to test a SQL Query in Winrunner? without using DataBase CheckPoints?
By writing scripting procedure in the TCL we can connect to the database and we can test database and queries.
The exact process should be:
1)connect to the database
db_connect(“query1”,DRIVER={drivername};SERVER=server_name;Uid=uidname;PWD=password;DBQ=database_name “);
2)Execute the query
db_excecute_query(“query1″,”write query u want to execute”);
-Condition to be mentioned-
3)disconnect the connection
db_disconnect(“query”);

How to test a DTS package created for data insert update and delete? What should be considered in the above case while testing it? What conditions are to be checked if the data is inserted, updated or deleted using text files?
Data Integrity checks should be performed. IF the database schema is 3rd normal form, then that should be maintained.
Check to see if any of the constraints have thrown an error. The most important command will have to be the DELETE command. That is where things can go really wrong.
Most of all, maintain a backup of the previous database.

Is a “A fast database retrieval rate” a testable requirement?
No. I do not think so. Since the requirement seems to be ambiguous. The SRS should clearly mention the performance or transaction requirements i.e. It should say like ‘A DB retrieval rate of 5 micro sec’.

How to Test Database Procedures and Triggers?
Before testing Data Base Procedures and Triggers, Tester should know that what is the Input and output of the procedures/Triggers, Then execute Procedures and Triggers, if you get an answer that Test Case will be pass otherwise fails.
These requirements should get from DEVELOPER

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.

What is a data-driven test?
The data-driven test is used to test the multi numbers of data in a data-table, using this we can easy to replace the parameters at the same time from different locations.
e.g: using .xsl sheets.

How to Test the database in Manually? Explain with an example
Observing that operations, which are operated on front-end are effected on back-end or not.
The approach is as follows :
While adding a record the’ front-end check back-end that addition of record is effected or not. So same for delete, update,…… Ex: Enter employee record in the database the’ front-end and check if the record is added or not to the back-
end(manually).

What is Database testing?
Database testing basically includes the following.
1)Data validity testing.
2)Data Integrity testing
3)Performance related to the database.
4)Testing of Procedure, triggers, and functions.
for doing data validity testing you should be good in SQL queries
For data integrity testing you should know about referential integrity and different constraint.
For performance related things you should have an idea about the table structure and design.
for testing Procedure triggers and functions you should be able to understand the same.

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.

Post Top Ad

Your Ad Spot

Pages