Added the update function to the DAO implementation.