Added database abstraction class