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 272 discussion

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

You are a developer at a social media company. The company runs their social media website on-premises and uses MySQL as a backend to store user profiles and user posts. Your company plans to migrate to Google Cloud, and your learn will migrate user profile information to Firestore. You are tasked with designing the Firestore collections. What should you do?

  • A. Create one root collection for user profiles, and create one root collection for user posts.
  • B. Create one root collection for user profiles, and create one subcollection for each user's posts.
  • C. Create one root collection for user profiles, and store each user's post as a nested list in the user profile document.
  • D. Create one root collection for user posts, and create one subcollection for each user's profile.
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
alpha_canary
6 months, 2 weeks ago
Selected Answer: B
B: The best practice for this scenario would be to create one root collection for user profiles and one subcollection for each user's posts. This allows for easy retrieval of all posts for a given user and aligns well with the hierarchical data model of Firestore. It also provides good isolation of data as each user's posts are stored separately.
upvoted 1 times
...
JonathanSJ
8 months, 3 weeks ago
Selected Answer: B
I will go for B.
upvoted 1 times
...
Kadhem
10 months, 1 week ago
Selected Answer: B
B is more appropriate
upvoted 1 times
...
kapara
10 months, 3 weeks ago
Selected Answer: B
For migrating user profile information to Firestore in your social media company, the best approach is: B. Create one root collection for user profiles, and create one subcollection for each user's posts. This structure offers better scalability, efficient data retrieval, and clearer organization, while also simplifying access control and data modeling. Options A, C, and D are less optimal due to potential performance issues, complex querying, and counterintuitive data relationships.
upvoted 1 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