test for database insertion