Implementing database access.