Issue #189: Relax interface to fit all cases.
Isseu #189: Add tests for DB Query.