First of all we need to do a schematic preparation for Database Testing, which involves:
Generate a list of database tables, stored procedures, triggers, defaults, rules and so on. This will help us to have a good handle on the scope of testing required for database testing.
Thereafter we can follow the following points:
1. Generate data schemata for tables. Analyzing the schema will help us determine the following:
# Can a certain field value be Null?
# What are the allowed or disallowed values?
# What are the constraints?
# Is the value dependent upon values in another table?
# Will the values of this field be in the look-up table?
# What are user defined data types?
# What are primary key and foreign key relationships among tables?
2. At a high level, analyze how the stored procedures, triggers, defaults and rules work. This will help us determine the following:
# What is the primary function of each stored procedure and trigger? Does it read data and produce outputs, write data or both?
# What are the accepted parameters?
# What are the return values?
# When is the stored procedure called and by whom?
# When is a trigger fired?
3. Determine what the configuration management process is. That is how the new tables, stored procedures, triggers and such are integrated.