Access to the database schema allows the tester to check in advance whether the requirements match the actual table structure.
Below are examples of bugs that can be found simply by comparing the requirements with the schema.
Data type
| Requirements |
Database |
| The field may contain any characters |
The field has a numeric type
INTEGER
|
| The field must store text up to 200 characters long |
The field is limited to 100 characters
VARCHAR(100)
|
Bug:
A smaller size constraint in the database may lead to errors when writing or updating data.
Integrity constraint
| Requirements |
Database |
| The field may be empty |
The field has a constraint
NOT NULL
|
Bug:
NOT NULL
constraint may cause an error when inserting a record with an empty value.
Value uniqueness
| Requirements |
Database |
| Values in the field are not unique |
The field has a constraint
UNIQUE
|
Bug:
UNIQUE
constraint may cause an error when inserting a record with a duplicate value.