Implement DB related classes.