basic db collection class implementation.