Update to the database