Valid Data-Architect Dumps shared by ExamDiscuss.com for Helping Passing Data-Architect Exam! ExamDiscuss.com now offer the newest Data-Architect exam dumps, the ExamDiscuss.com Data-Architect exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com Data-Architect dumps with Test Engine here:
Universal Containers (UC) owns a complex Salesforce org with many Apex classes, triggers, and automated processes that will modify records if available. UC has identified that, in its current development state, UC runs change of encountering race condition on the same record. What should a data architect recommend to guarantee that records are not being updated at the same time?
Correct Answer: A
According to the How to avoid row lock or race condition in Apex blog post, one of the ways to prevent race condition in Apex is to use the FOR UPDATE keyword in SOQL statements. The blog post states that "We need to lock the records on which we are working such that other batches or threads will not be having any effect on them. How can we lock a record, then? We need to make use of FOR UPDATE keyword in the SOQL query." Therefore, a data architect should recommend this solution to guarantee that records are not being updated at the same time by different processes.