exam questions

Exam DP-201 All Questions

View all questions & answers for the DP-201 exam

Exam DP-201 topic 1 question 43 discussion

Actual exam question from Microsoft's DP-201
Question #: 43
Topic #: 1
[All DP-201 Questions]

You are designing an Azure Cosmos DB database that will contain news articles.
The articles will have the following properties: Category, Created Datetime, Publish Datetime, Author, Headline, Body Text, and Publish
Status. Multiple articles will be published in each category daily, but no two stories in a category will be published simultaneously.
Headlines may be updated over time. Publish Status will have the following values: draft, published, updated, and removed. Most articles will remain in the published or updated status. Publish Datetime will be populated only when Publish Status is set to published.
You will serve the latest articles to websites for users to consume.
You need to recommend a partition key for the database container. The solution must ensure that the articles are served to the websites as quickly as possible.
Which partition key should you recommend?

  • A. Publish Status
  • B. Category + Created Datetime
  • C. Headline
  • D. Publish Date + random suffix
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
You can form a partition key by concatenating multiple property values into a single artificial partitionKey property. These keys are referred to as synthetic keys.
Incorrect Answers:
D: Publish Datetime will be populated only when Publish Status is set to published.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/synthetic-partition-keys

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
anamaster
Highly Voted 4 years, 1 month ago
and the publish status and headline will change
upvoted 6 times
hello_there_
3 years, 10 months ago
And publish date as well, from null to some value. Changing partition keys is not allowed, so only possible answer is B
upvoted 2 times
...
...
cadio30
Most Recent 4 years ago
the propose solution is correct. Publish datetime is not an option here as the partition key should be in string or integer
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...