Database Testing Flashcards
Long-term data storage
What’s database where data is stored in tables in the forms of rows and columns
Parts of a database
Data and Schema
What’s data
Data is information
What’s a table
Table is a set of rows and rows have columns
Object and Properties
Another way of looking at rows and columns where the row is an object and column is a property
What’s schema
Data structures - Tables, Rows, Columns, Datatype
Data structure in the Database is called schema
What are the other parts of schema other than tables, rows and columns
Functions, Triggers, Views and Procedures
What’s a view
Section of a database - show the data from a single table or multiple tables
What’s a stored procedure
small program contain SQL queries - can accept inputs
What is a function?
Function just has input parameter. Stored Procedure has both input and output parameters
What is a trigger?
Small program that executes automatically when you perform an operation on a table
What do you do in schema testing
check the column names and their datatypes and the number of characters it can take in and check the relationship between the tables (using the schema diagram)
how do you test a view in a database?
x
how do you test stored procedure?
x
how do you test a function?
Getdate (), Square ()
When do you perform the schema testing?
Schema testing is done when the database for first designed and created
Where the major part of effort will go into testing the database. Schema or Data?
Data
What we test in a table?
Check whether the data is captured correctly with respect to Source (xml file or another db or captured in form)
Give me an example how do you write a Group By query?
TBD
Give me an example of nested SQL query
TBD
Database Testing Challenges
Large Size of the DB
Solution: Important and prioritize the data to be tested in important tables.
Frequent Changes to the DB schema
What’s your database testing approach?
a) Gather the database testing requirements
b) Create test scenarios against each of those requirement. Test Schema and Data
c) Negative testing - Try inserting invalid data
d) Update existing valid data into invalid data
f) Try and delete a data where it shouldnt be deleted
g) Security testing in DB testing which involves privileges
DB test plan components
DB name and application Scope (in scope/out of scope) Test approach (what are the test you are going to perform) Test Environment, Server, Tool Task and Schedule Entry and Exit Criteria for testing Defect Reporting Risks/Mitigation
What’s data quality or data issues
a) Incomplete or missing data
b) Inaccuracy
c) Inconsistency (for e.g. currency in dollar and euro)
d) Duplication or Redundancy
e) Non standard format data (for e.g. number of places after the decimal point)
Data Profiling - Explore data, identify issues and summarize data
Data Cleansing - fix data issues
Data Monitoring - maintain data quality
Data Quality Assurance Process