These days, database is one of the inevitable parts of a software application. Whether it is healthcare of finance, leasing or retail, mailing application or controlling spaceship, behind the scene a database is always in action.
Following are what to test in database testing:
1. Ensure data mapping
2. Ensure ACID Properties of Transactions
3. Ensure Data Integrity
4. Ensure Accuracy of implemented Business Rules
Here are some tips to how to test database:
1. Create your own Queries
First of all a tester should have very good knowledge of SQL and specially DML statements. Secondly, the tester should acquire good understanding of internal DB structure of AUT. Moreover, if the application is very complex then it may be hard or impossible for the tester to write all of the needed SQL queries himself or herself. However, tester may get help from the developer too.
2. Observe data table by table
If the tester is not good in SQL, then he or she may verify the result of CRUD operation, performed using GUI of the application, by viewing the tables of DB.
3. Get query from developer
This is the simplest way for the tester to test the DB. Perform any CRUD operation from GUI and verify its impacts by executing the respective SQL query obtained from the developer. It requires neither good knowledge of SQL nor good knowledge of application’s DB structure.
Source: http://www.softwaretestinghelp.com/database-testing-%e2%80%93-practical-tips-and-insight-on-how-to-test-database/