Utilities to facilitate databases querying