Implementation of Persistence for DB.