Adding more database logic.