Showing posts with label database testing. Show all posts
Showing posts with label database testing. Show all posts

Tuesday, April 6, 2010

DataBase Testing Interview Questions

Database testing is one of the important testing technique to see whether what is happening on the UI is actually being done in the backendi n database. Whether the records are inserted or updated etc, a database integrity check should be done and that is the reason Database Testing is given importance.

Below are some of the interview questions on Database Testing with answers. Hope these migt be helpful.

1. Write a query to find the second largest value in a given column of a table?


Select MAX(Salary) from EmployeeDetails
where Salary < (select MAX(Salary)from EmployeeDetails);


First this statement in the where condition "select MAX(Salary)from EmployeeDetails" is executed which gives the maximum salary of the table. This is the highest max salary. Then the statement before the where condition is executed and is stored as salary. This value is compared with the max salary to satisfy the less than condition and gives the second highest salary.


2. Write a query to find the person with "nth" highest salary?


Select * from EmployeeDetails a where 15 = (select count(distinct(Salary)) from EmployeeDetails b where a.Salary <=b.Salary);

Tuesday, October 6, 2009

Database Testing in Software Testing

Database Testing is one of the most important type in Software Testing and this should not be neglected.


When I was told that i need to do a Data base testing in my early career in Testing i was quite nervous because always i thought that it is a developers job and also that one needs to know a programming language since it deals with writing queries and was always afraid of it. since i had to be in the job and make my livelihood had to learn SQL and when learning about database and SQL understood the importance of the back end process which goes on for a web application or for any application which needs to store information.

I have been into testing for a few years and I always find it a challenge to break the system i.e to find out potential bugs which break the application.I have been doing functional testing most of my career that to on the UI front but with the type of applications mostly e-commerce websites coming for testing I had to concentrate on the back end testing i.e for Database Testing.

I found it the most challenging because there will be lot of relations between the table and you need to write the correct query to get the result and over the period of time I understood the importance of Database testing and how it can uncover the bugs which otherwise would have been ignored and this helped in making the application more stable and also to maintain the quality of the application.

Most of the time what a tester sees on the UI or on the screen may not really happpen in the database like inserting or updating, deleting or adding a user information etc every thing may seem to be working perfect from the UI but again coming back to those pages after some time may not display the same results and have faced them and most of us might have faced them. So inorder to track these Data base testing will help a lot if one has the knowledge of it. its not about writing a query but understanding the flow of the information and the knowledge of the tables and how the information is captured. This will take a lot of time and experience for oneself but over the period of time we become perfect and help us to be effective in testing and can guarantee a reliable, bugfree application.

For a detailed study on this topic for furhter reference please go through
Database Testing techniques for Software Testing and Software Quality Contol