exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 53 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 53
Topic #: 1
[All Professional Cloud Developer Questions]

You are designing a schema for a table that will be moved from MySQL to Cloud Bigtable. The MySQL table is as follows:

How should you design a row key for Cloud Bigtable for this table?

  • A. Set Account_id as a key.
  • B. Set Account_id_Event_timestamp as a key.
  • C. Set Event_timestamp_Account_id as a key.
  • D. Set Event_timestamp as a key.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
salgabri
Highly Voted 4 years, 5 months ago
correct answer is B https://cloud.google.com/bigtable/docs/schema-design
upvoted 21 times
syu31svc
3 years, 10 months ago
From the link: "Include a timestamp as part of your row key if you often need to retrieve data based on the time when it was recorded. For example, your application might need to record performance-related data, such as CPU and memory usage, once per second for a large number of machines. Your row key for this data could combine an identifier for the machine with a timestamp for the data (for example, machine_4223421#1425330757685). Keep in mind that row keys are sorted lexicographically."
upvoted 3 times
...
...
PinkeshExampTopics
Most Recent 4 months, 3 weeks ago
Selected Answer: C
By using Event_timestamp_Account_id as the row key, you can efficiently query for events within a specific time range for a given account. While Option B would allow you to query events for a specific account, it might not be as efficient for time-based queries.
upvoted 1 times
...
santoshchauhan
1 year, 1 month ago
Selected Answer: B
Designing an appropriate row key for Cloud Bigtable requires considering the access patterns and ensuring that the read and write operations are spread evenly across the key space to avoid hotspots. B. Set Account_id_Event_timestamp as a key. This option is likely the best choice because: Combining Account_id with Event_timestamp in the row key would allow you to maintain a good level of data distribution while preserving the ability to query efficiently by Account_id and sort by Event_timestamp within each account. This aligns well with Bigtable’s strengths in handling large, scalable, and sparse datasets. By leading with Account_id, you group all events for a single account close together in the key space, which can be efficient for reads that are interested in the activity of a specific account.
upvoted 1 times
...
__rajan__
1 year, 7 months ago
Selected Answer: B
I would go with B.
upvoted 1 times
...
omermahgoub
2 years, 3 months ago
B. Set Account_id_Event_timestamp as a key. The primary key in the MySQL table is a composite key consisting of Account_id and Event_timestamp, so it would make sense to use both of these values as the row key in Cloud Bigtable. This allows for efficient querying and sorting by both Account_id and Event_timestamp.
upvoted 1 times
omermahgoub
2 years, 3 months ago
A would not be a good choice because the row key would not include the Event_timestamp, which is part of the primary key in the MySQL table. Option
upvoted 1 times
...
omermahgoub
2 years, 3 months ago
D would not be a good choice because it would not include the Account_id, which is also part of the primary key in the MySQL table.
upvoted 1 times
...
omermahgoub
2 years, 3 months ago
C would not be a good choice because it would make it difficult to query and sort by Account_id.
upvoted 1 times
...
...
tomato123
2 years, 8 months ago
Selected Answer: B
B is correct
upvoted 3 times
...
maxdanny
2 years, 9 months ago
Selected Answer: B
https://cloud.google.com/bigtable/docs/schema-design#row-keys It's B because : "Row keys that start with a timestamp. This pattern causes sequential writes to be pushed onto a single node, creating a hotspot. If you put a timestamp in a row key, precede it with a high-cardinality value like a user ID to avoid hotspotting."
upvoted 3 times
...
saumabhaM
3 years ago
Selected Answer: B
Include a timestamp as part of your row key and avoid having timestamp at the start of the key
upvoted 1 times
...
whigy
4 years, 5 months ago
Should be C. Account id as the first part of the key has no benifit for search
upvoted 2 times
mastodilu
3 years, 11 months ago
https://cloud.google.com/bigtable/docs/schema-design#row-keys avoid row keys that starts with a timestamp. Also using a key such as userID_timestamp allows bigtable to query related rows in a range rather than parsing the entire database.
upvoted 4 times
...
donchick
4 years, 4 months ago
https://cloud.google.com/bigtable/docs/schema-design#timestamps - avoid placing a timestamp at the start of the row key. I vote for B.
upvoted 6 times
fraloca
4 years, 3 months ago
"Row keys that start with a timestamp. This will cause sequential writes to be pushed onto a single node, creating a hotspot. If you put a timestamp in a row key, you need to precede it with a high-cardinality value like a user ID to avoid hotspotting."
upvoted 8 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago