interface for database querying and retrieval