created a command object and implemented the query and database-query functions for it