extract database access logic into the new DAO level