make DatabaseEntry instances hashable
finished (low-level) implementation of query support