You have a database named db1 in an Azure Cosmos DB for NoSQL
You are designing an application that will use dbl.
In db1, you are creating a new container named coll1 that will store in coll1.
The following is a sample of a document that will be stored in coll1.

The application will have the following characteristics:
* New orders will be created frequently by different customers.
* Customers will often view their past order history.
You need to select the partition key value for coll1 to support the application. The solution must minimize costs.
To what should you set the partition key?
Suggested Answer: A
Get Premium DP-420 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
31 comments · newest first
CA
Carin
11 months ago
I’ve heard customerId is the go-to for minimizing costs in this scenario.
IN
In
11 months ago
Wait, why not use orderDate? Seems like it could work too!
FR
Francoise
11 months ago
Not sure about that, orderId could be more efficient for unique access.
DO
Dottie
12 months ago
Definitely agree, it helps with order history retrieval!
VI
Vivan
12 months ago
I think customerId is the best choice for the partition key.
SU
Sueann
1 year ago
I was leaning towards orderId, but now I wonder if it would create too many partitions. I guess customerId could balance the load better.
KR
Kristine
1 year ago
I practiced a similar question where we had to choose a partition key for user data. I think id might not be ideal since it doesn't group related data together.
ED
Edward
1 year ago
I'm not entirely sure, but I feel like using orderDate could lead to issues with hot partitions, especially if many orders come in on the same day.
HI
Hillary
1 year ago
I remember we discussed how partition keys can affect performance and cost. I think customerId might be a good choice since it can help group orders by customer.
LA
Lang
1 year ago
The "id" option seems tempting, but I don't think that would be the best choice here. We want to optimize for querying order history, so "customerId" is probably the way to go.
MA
Marjory
1 year ago
I'm leaning towards the "customerId" option. That seems like it would allow us to efficiently query a customer's past orders, which is one of the key application requirements.
ZA
Zack
1 year ago
Okay, let's see. The question says new orders will be created frequently by different customers, and customers will often view their past order history. I think the partition key should be something that allows efficient querying of a customer's order history.
MA
Maryanne
1 year ago
Hmm, I'm a bit unsure about this one. The sample document has a lot of different fields, and I'm not sure which one would be the best partition key.
ST
Stephane
1 year ago
This looks like a classic Azure Cosmos DB partition key selection question. I'll need to think carefully about the application characteristics and how to optimize for cost.
CA
Carole
1 year ago
I've seen questions like this before, so I think I know what to look for. The key is to identify which commands Jane can run without a password, and which ones require her password or the root password.
DE
Delsie
1 year ago
Ah, I see. The question is asking about a specific requirement, so I'll need to pay close attention to the details in each option. Knowing the right Kubernetes version and having the Ezmeral ML Ops package installed seem like important factors to consider.
HE
Helene
1 year ago
I'd set the partition key to 'hasCoupon'. That way, the database will always know which orders have coupons and which don't. *winks*
RO
Rochell
1 year ago
The partition key should be 'id', of course! That's the most common and reliable choice for any database, right? *chuckles* Just kidding, 'customerId' is probably the way to go here.
RO
Rory
1 year ago
Definitely 'customerId', it aligns with the frequent order creation and order history viewing.
DE
Della
1 year ago
'customerId' seems like the logical choice to keep related data together.
LA
Lavelle
1 year ago
I think 'customerId' would work well to group orders by customer.
LE
Leonor
1 year ago
Agreed, 'customerId' makes the most sense for this scenario.
JA
Jacquelyne
1 year ago
Hmm, I'm not sure. 'orderDate' might be a good option to group orders chronologically and support the order history feature. But I guess 'customerId' is the safest choice.
GL
Glenna
1 year ago
I would go with 'orderId' as the partition key. This way, each order is isolated and can be accessed quickly, which is important for the application's performance.
HO
Hoa
1 year ago
Setting the partition key to 'customerId' makes the most sense to me. This will allow Azure Cosmos DB to efficiently distribute the data and handle the frequent creation of new orders and customers viewing their past orders.
LY
Lynda
1 year ago
Definitely 'customerId' for the partition key, it aligns well with the application requirements.
AI
Aimee
1 year ago
I think 'customerId' is the most logical option for the partition key.
FA
Fannie
1 year ago
I agree, setting the partition key to 'customerId' would be the best choice.
DI
Dick
2 years ago
That makes sense too. We need to consider both factors to minimize costs.
NU
Nu
2 years ago
I disagree, I believe we should set the partition key to orderId because new orders will be created frequently by different customers.
DI
Dick
2 years ago
I think we should set the partition key to customerId because customers will often view their past order history.