query: bind queries to database objects