db abstract class