Add a method to update the database