Added Test Files

Added test files for dbquery, and made changes according to testing.