exam questions

Exam AZ-203 All Questions

View all questions & answers for the AZ-203 exam

Exam AZ-203 topic 3 question 1 discussion

Actual exam question from Microsoft's AZ-203
Question #: 1
Topic #: 3
[All AZ-203 Questions]

HOTSPOT -
A company develops a series of mobile games. All games use a single leaderboard service.
You have the following requirements:
✑ Code should be scalable and allow for growth.
✑ Each record must consist of a playedId, gameId, score, and time played.
✑ When users reach a new high score, the system will save the new score using the SaveScore function below.
✑ Each game is assigned and Id based on the series title.
You plan to store customer information in an Azure Cosmos database. The following data already exists in the database:

You develop the following code to save scores in the database. (line numbers are included for reference only.)

You develop the following code to query the database. (line numbers are included for reference only.)

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer: Explanation
Box 1: Yes -
Code for CosmosDB, example:
// Parse the connection string and return a reference to the storage account.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
// Create the table client.
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
// Retrieve a reference to the table.
CloudTable table = tableClient.GetTableReference("people");
// Create the TableOperation object that inserts the customer entity.
TableOperation insertOperation = TableOperation.Insert(customer1);

Box 2: No -
A new record will always be added as TableOperation.Insert is used, instead of TableOperation.InsertOrReplace.

Box 3: No -
No partition key is used.

Box 4: Yes -
References:
https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-dotnet

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
hertino
Highly Voted 4 years, 10 months ago
Today I got 900, I had this question, my answer: Code for CosmosDB Yes Save score func No Data partitioned No Code store parametres Yes
upvoted 24 times
Juanlu
4 years, 6 months ago
Agree !
upvoted 4 times
...
...
heero
Highly Voted 5 years, 3 months ago
https://www.sharetotest.com/images/AZ-202.files/image137.jpg
upvoted 20 times
...
Rabi3
Most Recent 1 year, 7 months ago
Can someone please explain something to me. The question are all related to to ComosDB however, cosmos db client is nowhere mentioned in the code. All i see are function of the storage account library.
upvoted 2 times
...
jay158
4 years, 2 months ago
Answer is Code for CosmosDb Yes Save Score func NO ( because TableOertaion.Insert only inserts, does not update data) Data partitioned Yes ( This is basic property of Table API, data is stored as PartitionKey+RowKey, and CosmosDB partitions data automatically) Data stored as GameId, PlayerID NO ( GameId will be stored but its name will be partitionkey in DB, and PlayerId shall be RowKey) So finally Yes NO Yes NO
upvoted 2 times
altafpatel1984
3 years, 6 months ago
It is not asked that it will be stored as playerid, gameid. It simply asks will they be stored or not?
upvoted 1 times
...
...
NPaul_92
4 years, 9 months ago
https://vceguide.com/when-users-reach-a-new-high-score-the-system-will-save-the-new-score-using-the-savescore-function-below/
upvoted 3 times
...
StoneZuk
4 years, 9 months ago
there is no partition mentioned for game. So answer is No
upvoted 1 times
...
malawneh
4 years, 10 months ago
I passed today with score 860, i got this in my exam. My answer was: Code for CosmosDB Yes Save score func No Data partitioned No Code store parametres Yes
upvoted 5 times
...
SkyDream
4 years, 11 months ago
gameid is not partitionkey in this example, some code snippet has a line to set partitionkey. If that exists then Yes else No.
upvoted 3 times
...
chintan4190
5 years, 3 months ago
gameId is partition key in https://www.examtopics.com/discussions/microsoft/view/16364-exam-az-203-topic-24-question-20-discussion/ so Box 3 should be yes
upvoted 3 times
mouni_S6
5 years, 1 month ago
I am still now convinced that gameid is partition key, whats with https://www.examtopics.com/discussions/microsoft/view/16364-exam-az-203-topic-24-question-20-discussion/ ,its the same question, what am I missing here?
upvoted 1 times
mouni_S6
5 years, 1 month ago
I am still not convinced that gameid is partition key, whats with https://www.examtopics.com/discussions/microsoft/view/16364-exam-az-203-topic-24-question-20-discussion/ ,its the same question, what am I missing here?
upvoted 1 times
...
...
...
hmirko
5 years, 3 months ago
gameid is partitionkey, it looks like Box 3 answer is Yes
upvoted 4 times
ebadali
5 years, 3 months ago
how come you believe gameid is partitionkey?
upvoted 1 times
hmirko
5 years, 3 months ago
https://www.examtopics.com/discussions/microsoft/view/16364-exam-az-203-topic-24-question-20-discussion/
upvoted 2 times
jw_duke
4 years, 11 months ago
I think this question is different than the link provided above.. based on the code shown. the partition key is not assigned during the SaveScore funtion.
upvoted 1 times
t8203
4 years, 11 months ago
The partition key is set when it is calling var scoreRecord = new PlayerScore(...)
upvoted 2 times
...
...
...
...
...
MuhamedHaneesh
5 years, 3 months ago
Post the options please..
upvoted 2 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 ...