database abstract class