nerdexam
Microsoft

DP-420 · Question #63

Which of the following is the most optimal method of managing referential integrity between different containers in Azure Cosmos DB?

The correct answer is B. Using an Azure Function trigger for Azure Cosmos DB to leverage on the change feed processor. The change feed APIs help in keeping the track of all the Insert and Updates on a container, creating a trigger depending upon the change feed, will allow the users to send those changes to other containers that also require those changes. Option A is incorrect. Azure Cosmos DB…

Integrate an Azure Cosmos DB solution

Question

Which of the following is the most optimal method of managing referential integrity between different containers in Azure Cosmos DB?

Options

  • ACreating an Azure Cosmos DB Function that will periodically search for changes done to your
  • BUsing an Azure Function trigger for Azure Cosmos DB to leverage on the change feed processor
  • CWhen any changes are created by your app to one container, also ensure it duplicates the
  • DAll are equally efficient

How the community answered

(67 responses)
  • A
    7% (5)
  • B
    73% (49)
  • C
    4% (3)
  • D
    15% (10)

Explanation

The change feed APIs help in keeping the track of all the Insert and Updates on a container, creating a trigger depending upon the change feed, will allow the users to send those changes to other containers that also require those changes. Option A is incorrect. Azure Cosmos DB functions don’t modify data and their scope is limited only within the container they are defined in. Option B is correct. Using an Azure Function trigger for Azure Cosmos DB to leverage the change feed processor to update the referenced containers is the most optimal way to manage referential integrity between different containers in Azure Cosmos DB. Option C is incorrect. While it can be possible to add this logic to your app, adding the code to the application won’t add complexity to your environment, but also it won’t guarantee that any changes carried out outside of the app would be replicated to the other containers. Option D is incorrect. Using an Azure Function trigger for Azure Cosmos DB to leverage the change feed processor to update the referenced containers is the most optimal method. https://docs.microsoft.com/en-us/learn/modules/advanced-modeling-patterns-azure-cosmos-db/4- manage-referential-integrity-with-change-feed

Topics

#Referential Integrity#Change Feed#Azure Functions#Cross-container management

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice