Microsoft

DP-420 practice question 10

Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB · free question 10 of 20

Question

You are creating a database in an Azure Cosmos DB for NoSQL account. The database will be used by an application that will provide users with the ability to share online posts. Users will also be able to submit comments on other users' posts. You need to store the data shown in the following table. | Type | Description | |---|---| | Users | Information about a user who will use the application | | Posts | Text of up to 1,000 characters that a user will share with other users | | Comments | Text of up to 280 characters that users will submit as a comment on a post | | Interests | Information about a user's interests | The application has the following characteristics: - Users can submit an unlimited number of posts. - The average number of posts submitted by a user will be more than 1,000. - Posts can have an unlimited number of comments from different users. - The average number of comments per post will be 100, but many posts will exceed 1,000 comments. - Users will be limited to having a maximum of 20 interests. For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.

Explanation

Statement 1 (Yes): Users average more than 1,000 posts of up to 1,000 characters, unbounded. Embedding them means every new post rewrites an ever-growing user document, and write RU charges scale with item size, so writes get more expensive (and the item can approach the 2 MB limit). Statement 2 (Yes): Comments are unbounded and many posts exceed 1,000 comments. Embedding them forces each new comment to replace the whole, growing post document, which costs more RUs than inserting a small separate comment document. Statement 3 (No): Interests are bounded at 20 per user and are read together with the user. Embedding them lets one point read return the user and the interests, which is cheaper than reading or querying separate interest documents.

Need the theory? Learn it free in the DP-420 course on Godlike Academy

Practice the whole free set

Answer all 20 free DP-420 questions with instant feedback, or unlock all 211 questions with Learn and Exam modes.