database testing code

adding code for testing database