Exam DP-420 Topic 2 Question 8 Discussion

Actual exam question for Microsoft's DP-420 exam
Question #: 8
Topic #: 2
You need to create a data store for a directory of small and medium-sized businesses (SMBs). The data store must meet the following requirements:
* Store companies and the users employed by them. Each company will have less than 1,000 users.
* Some users have data that is greater than 2 KB.
* Associate each user to only one company.
* Provide the ability to browse by company.
* Provide the ability to browse the users by company.
* Whenever a company or user profile is selected, show a details page for the company and all the related users.
* Be optimized for reading data.
Which design should you implement to optimize the data store for reading data?

Suggested Answer: B Vote an answer

Explanation
Azure Cosmos DB is a multi-model database that supports various data models, such as documents, key-value, graph, and column-family3. The core content-model of Cosmos DB's database engine is based on atom-record-sequence (ARS), which allows it to store and query different types of data in a flexible and efficient way3.
To optimize the data store for reading data, you should consider the following factors:
* The size and shape of your data
* The frequency and complexity of your queries
* The latency and throughput requirements of your application
* The trade-offs between storage efficiency and query performance
Based on these factors, one possible design that you could implement is B. In a company container, create a document for each company. Embed the users into company documents. Use the company ID as the partition key.
This design has the following advantages:
* It stores companies and users as self-contained documents that can be easily retrieved by company ID1.
* It avoids storing redundant data or creating additional containers for users1.
* It allows you to browse by company and browse the users by company with simple queries1.
* It shows a details page for the company and all the related users by fetching a single document1.
* It leverages the benefits of embedding data, such as reducing the number of requests, improving query performance, and simplifying data consistency2.
This design also has some limitations, such as:
* It may not be suitable for some users who have data that is greater than 2 KB, as it could exceed the
* maximum document size limit of 2 MB2.
* It may not be optimal for scenarios where users need to be associated with more than one company or queried independently from companies2.
* It may not be scalable for companies that have more than 1,000 users, as it could result in hot partitions or throttling2.
Depending on your specific use case and requirements, you may need to adjust this design or choose a different one. For example, you could use a hybrid data model that combines embedding and referencing data2
, or you could use a graph data model that expresses entities and relationships as vertices and edges.

by Luther at Jan 06, 2024, 02:45 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
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.

0
0
0
10