implementing database