Update document for DB