can connect and query the database