db base class