2. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
Chapter: 1 Topic: Basics of Database
1. The DBMS acts as an interface between what two components of an enterprise-class
database system?
a. Database application and the database
b. Data and the database
c. The user and the database application
d. Database application and SQL
Ans: a
Chapter: 1 Topic: Software Testing Fundamentals
2. A DBMS that combines a DBMS and an application generator is ________ .
a. Microsoft SQL Server
b. MS Access
c. IBM DB2
d. Oracle Corp
Ans: b
Chapter: 1 Topic: MS Access Basics
3. The advantage of using a spreadsheet is
a. Calculations can be done automatically
b. Changing data automatically updates calculations
c. More flexibility
d. All of the Above
Ans: d
4. There are three types of data found in a spreadsheet:
a. Numbers, formulas, labels
b. Data, words, numbers
c. Words, numbers, labels
d. Equations, data, numbers
Ans: a
3. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
5. How we save database file in MS Access 2007 for Ms Access 2000?
a. Save As MS Access 2000 Database
b. Save Only
c. Save Object As
Ans: a
6. when creating a new database in Microsoft Access, at what point is the user REQUIRED
(i.e., the latest possible time) to name the database file within the Access software program?
a. After some data has been entered into the tables for that database.
b. Before the user exits the program, after having completed the desired work.
c. Before the user creates any tables, immediately after giving the command to create a
new database.
d. After the tables and the relationship layout have been created, but before data is
entered into the tables.
e. After the tables have been created, but before the relationship layout is created.
Ans: c
7. When creating a database in Microsoft Access
a. Referential integrity is only enforced for those relationships for which the database
designer or user places a check mark in a box for "enforce referential integrity" during
or after creation of the relationships in the relationship layout.
b. In Access it is impossible to create a table without designating a primary key.
c. Foreign keys must be specified for each table.
d. To delete a relationship, simply deleting one of the tables involved in the relationship
will do the trick.
e. All data entry problems will result in error messages
Ans: a
8. The view in which the field data types and field properties for a database table can be seen
in Microsoft Access is called the
a. Datasheet View
b. Design View
c. SQL View
d. Dashboard view
e. Field View
Ans: b
4. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
Chapter: 2 Topic: Mastering SQL
9. You can add a row using SQL in a database with which of the following?
a. Add
b. Create
c. Insert
d. Make
Ans: c
10. The command to remove rows from a table 'CUSTOMER' is:
a. REMOVE FROM CUSTOMER …
b. DROP FROM CUSTOMER …
c. DELETE FROM CUSTOMER WHERE …
d. UPDATE FROM CUSTOMER …
Ans: c
11. A view is which of the following?
a. A virtual table that can be accessed via SQL command
b. A virtual table that cannot be accessed via SQL commands
c. A base table that can be accessed via SQL commands
d. A base table that cannot be accessed via SQL commands
Ans:a
12. SQL data definition commands make up a(n) ________ .
a. DDL
b. DML
c. XML
d. HTML
Ans: a
13. Which of the following is valid SQL for an Index?
a. CREATE INDEX ID;
b. CHANGE INDEX ID;
c. ADD INDEX ID;
d. REMOVE INDEX ID;
Ans: a
5. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
14. The SQL keyword(s) ________ is used with wildcards.
a. LIKE only
b. IN only
c. NOT IN Only
d. IN and NOT IN
Ans: a
15. The result of a SQL SELECT statement is a(n) ________ .
a. report
b. form
c. file
d. table
Ans: d
16. To remove duplicate rows from the results of an SQL SELECT statement, the ________
qualifier specified must be included.
a. only
b. unique
c. distinct
d. single
Ans: c
17. Which of the following do you need to consider when you make a table in SQL?
a. Data types
b. Primary Keys
c. Default Values
d. All of the Above
Ans: d
18. Find the SQL statement below that is equal to the following: SELECT NAME FROM
CUSTOMER WHERE STATE = 'VA';
a. SELECT NAME IN CUSTOMER WHERE STATE IN ('VA');
b. SELECT NAME IN CUSTOMER WHERE STATE = 'VA';
c. SELECT NAME IN CUSTOMER WHERE STATE = 'V';
d. SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');
Ans: d
6. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
19. Which one of the following sorts rows in SQL?
a. SORT BY
b. ALIGN BY
c. ORDER BY
d. GROUP BY
Ans: c
20. What type of join is needed when you wish to include rows that do not have matching
values?
a. Equi Join
b. Natural Join
c. Outer Join
d. All of the Above
Ans: c
21. What type of join is needed when you wish to return rows that do have matching values?
a. Equi Join
b. Natural Join
c. Outer Join
d. All of the Above
Ans: d
22. The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID,
ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T, ORDER_T WHERE
CUSTOMER_T. CUSTOMER_ID = ORDER_T. CUSTOMER_ID
a. Equi Join
b. Natural Join
c. Outer Join
d. Cartesian Join
Ans: a
23. How many tables may be included with a join?
a. One
b. Two
c. Three
d. All of the Above
Ans: d
7. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
24. The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID,
ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T, ORDER_T ;
a. Equi Join
b. Natural Join
c. Outer Join
d. Cartesian Join
Ans: d
25. Triggers are stored blocks of code that have to be called in order to operate.
a. TRUE
b. FALSE
Ans: b
26. The entity integrity rule states that:
a. No primary key attribute may be null.
b. No primary key can be composite.
c. No primary key may be unique.
d. No primary key may be equal to a value in a foreign key.
Ans: a
27. A foreign key is which of the following?
a. Any attribute
b. The same thing as a primary key
c. An attribute that serves as the primary key of another relation
d. An attribute that serves no purpose
Ans: c
28. Which of the following is NOT a type of SQL constraint?
a. Primary Key
b. Foreign Key
c. Alternate Key
d. Unique
Ans: c
8. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
29. In which case would you use a FULL OUTER JOIN?
a. Both tables have NULL values.
b. You want all unmatched data from one table.
c. You want all matched data from both tables.
d. You want all unmatched data from both tables.
e. One of the tables has more data than the other.
Ans: d
30. Evaluate this SQL statement:
SELECT e.EMPLOYEE_ID, e.LAST_NAME, e.DEPARTMENT_ID, d.DEPARTMENT_NAME
FROM EMP e, DEPARTMENT d WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID;
In the statement, which capabilities of a SELECT statement are performed?
a. Selection, projection, join
b. Difference, projection, join
c. Selection, intersection, join
d. Intersection, projection, join
e. Difference, projection, product
Ans: a
31. Examine the structure of the EMPLOYEES and DEPARTMENTS tables:
EMPLOYEES
EMPLOYEE_ID NUMBER
DEPARTMENT_ID NUMBER
MANAGER_ID NUMBER
LAST_NAME VARCHAR2(25)
DEPARTMENTS
DEPARTMENT_ID NUMBER
MANAGER_ID NUMBER
DEPARTMENT_NAME VARCHAR2(35)
LOCATION_ID NUMBER
9. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
You want to create a report displaying employee last names, department names, and
locations. Which query should you use to create an equi-join?
a. SELECT last_name, department_name, location_id FROM employees , departments ;
b. SELECT employees.last_name, departments.department_name,
departments.location_id FROM employees e, departments D WHERE e.department_id
=d.department_id;
c. SELECT e.last_name, d.department_name, d.location_id FROM employees e,
departments D WHERE manager_id =manager_id;
d. SELECT e.last_name, d.department_name, d.location_id FROM employees e,
departments D WHERE e.department_id =d.department_id;
Ans: d
32. In which two cases would you use an outer join? (Choose two.)
a. The tables being joined have NOT NULL columns.
b. The tables being joined have only matched data.
c. The columns being joined have NULL values.
d. The tables being joined have only unmatched data.
e. The tables being joined have both matched and unmatched data.
Ans: c, e
33. Which of the following query is correct for using comparison operators in SQL?
a. SELECT sname, course name FROM student info WHERE age>50 and <80;
b. SELECT sname, course name FROM student info WHERE age>50 and age <80;
c. SELECT sname, course name FROM student info WHERE age>50 and WHERE age<80;
d. None of the Above
Ans: b
34. Which of the following SQL query is correct for selecting the name of staffs from 'tblstaff'
table where salary is 15,000 or 25,000?
a. SELECT sname from tblstaff WHERE salary IN (15000, 25000);
b. SELECT sname from tblstaff WHERE salary BETWEEN 15000 AND 25000;
c. Both 1 and 2
d. None of the Above
Ans: a
10. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
35. Where is metadata stored in MySQL?
a. In the MySQL database metadata
b. In the MySQL database metasql
c. In the MySQL database mysql
d. None of the above is correct.
Ans: c
Chapter: 3 and 4 Topic: Testing Databases
36. ________ is an open source DBMS product that runs on UNIX, Linux and Windows.
a. MySQL
b. JSP/SQL
c. JDBC/SQL
d. SUN Access
Ans: a
37. What MySQL property is used to create a surrogate key in MySQL?
a. UNIQUE
b. SEQUENCE
c. AUTO_INCREMENT
d. None of the Above
Ans: c
38. What do you do in database testing ?
a. check for data integrity
b. Check whether the records are physically deleted
c. Check for length for the specific field.
d. check out the relation ships
e. All of the above
Ans: e
11. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
39. How to create a new Database from Toad Oracle?
a. create database
b. Add Database
c. Form Database
d. None of the above
Ans: a
40. What does Black box database testing Involves?
a. Mapping of data (including metadata)
b. Verifying incoming data
c. Verifying outgoing data from query functions
d. Various techniques such as Cause effect graphing technique, equivalence partitioning
and boundary-value analysis.
e. All of the above
Ans: e
41. What does White box database testing Involves?
a. testing of database triggers and logical views
b. performs module testing of database functions, triggers, views, SQL queries
c. validates database tables, data models, database schema etc
d. Checks rules of Referential integrity.
e. All of the above
Ans: e
42. Database Checkpoints are Supported in All Environments
a. TRUE
b. FALSE
Ans: a
43. Database checkpoint are displayed in the Expert View as a checkpoint
a. Dbtable.checkpoint
b. Datatable.check
c. Dbtable.check
d. Dtable.check
Ans: c
12. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
44. In the Database checkpoint properties dialogbox, the -------------- displays the data that was
captured from the checkpoint
a. lotusdb area
b. table area
c. spreadsheet area
d. grid area
Ans: d
45. In the Database checkpoint properties dialog box, you can select to check the
a. entire results set
b. specific rows
c. specific columns
d. specific cells
e. All of the above
Ans: e
46. Database checkpoint enables you to test database
a. TRUE
b. FALSE
Ans: a
47. You cannot modify the SQL query Definition and the expected data in the database
checkpoint
a. TRUE
b. FALSE
Ans: b
48. In Database checkpoint properties dialog box, the default setting is to treat cell values as --
--------- and to check the exact text while ignoring spaces
a. Numeric
b. String
c. Variant
d. Array
Ans: b
13. Database Testing Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
49. You can modify the value of the cell or you can parameterize it to use a value from an
external source, such as
a. Data table
b. Environment Variable
c. Both 1 and 2
d. None of the above
Ans: c
50. What do you need selenium with Java to connect to the Database?
a. JDK
b. JDBC
c. JVM
d. All of the Above
Ans: b