Implementing database abstration