Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Cloud Developer Exam - Topic 1 Question 85 Discussion

Posted by Cory on Jun 24, 2024 at 10:48 AM

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 team will migrate user profile information to Firestore. You are tasked with designing the Firestore collections. What should you do?

Suggested Answer: C

Get Premium Professional Cloud Developer Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
30 comments · newest first
JU
Junita 11 months ago
I’m surprised they’re not using a more relational approach with MySQL.
RE
Reynalda 11 months ago
Wait, why would you create a subcollection for profiles? That seems odd.
RE
Remona 11 months ago
Option B could work too, but it feels less organized.
TH
Theodora 11 months ago
Definitely agree with C! Subcollections are the way to go.
FR
Frederick 12 months ago
I think option C makes the most sense for organizing posts.
BE
Ben 12 months ago
I’m a bit confused about the subcollections. Wouldn't option D make more sense if we prioritize posts over profiles?
VE
Verda 1 year ago
I practiced a similar question, and I think nesting posts within user profiles might complicate queries. So, option C seems like the best choice.
HU
Hui 1 year ago
I'm not entirely sure, but I feel like having a separate collection for posts could lead to better performance. Maybe option B?
DO
Dorsey 1 year ago
I remember we discussed the importance of structuring data in Firestore for scalability. I think option C makes sense for that.
FA
Fallon 1 year ago
I feel pretty confident about this one. Based on the information provided, I think option C is the best approach - creating one root collection for user profiles and a subcollection for each user's posts. This will allow us to easily query and access the data we need.
CL
Cletus 1 year ago
Okay, let's think this through step-by-step. We want to store user profiles and user posts, and the question is asking about the Firestore collection design. I'd start by considering how the data will be accessed and queried.
DE
Demetra 1 year ago
Hmm, I'm a bit unsure about this one. I know Firestore has different ways to model data, but I'm not sure which approach would be best here. I'll need to carefully consider the tradeoffs between the options.
IZ
Izetta 1 year ago
This seems like a straightforward design question. I'd start by thinking about the relationships between user profiles and user posts, and how that should be reflected in the Firestore structure.
RA
Raymon 1 year ago
I'm a bit confused by this question. I'm not sure which approach would be best. Maybe I'll try a few options and see what works.
JE
Jess 2 years ago
Option C is the way to go, no doubt. Keeping those user posts nice and cozy in their own subcollections - it's like a Firestore hug for your data!
LA
Lauran 2 years ago
↳ replying to Jess
C) That's right! Having each user's posts in their own subcollection keeps the data organized and easy to access.
GL
Glenn 2 years ago
↳ replying to Jess
A) Create one root collection for user profiles, and store each user's post as a nested list in the user profile document.
CH
Chandra 2 years ago
↳ replying to Jess
C) Create one root collection for user profiles, and create one subcollection for each user's posts.
NO
Norah 2 years ago
↳ replying to Jess
Definitely, it's important to structure the Firestore collections in a way that makes sense for the data.
MA
Margarita 2 years ago
↳ replying to Jess
Agreed, it will keep the data organized and easily accessible.
PE
Pete 2 years ago
↳ replying to Jess
I think option C is the best choice. Each user's posts should have their own subcollection.
MI
Micheline 2 years ago
That's a good point, Belen. It really depends on how we want to structure the data for efficient querying and scalability.
BE
Belen 2 years ago
I see your point, Antione, but I think option D could also work well by organizing posts first and then linking them to user profiles.
AN
Antione 2 years ago
I disagree, I believe option B is better as it separates user profiles and posts into different collections for better organization.
LI
Lino 2 years ago
I'm going to have to go with option C. Nested subcollections just make sense for this use case, and it aligns with best practices for Firestore data modeling.
SH
Shayne 2 years ago
Option B is the best choice. Separating user profiles and posts into different root collections is more scalable and allows for more flexibility in the long run.
FI
Filiberto 2 years ago
I think option C is the way to go. It keeps the user profiles and posts nicely organized, and makes it easy to query data for a specific user.
TO
Tomas 2 years ago
↳ replying to Filiberto
Yeah, having a subcollection for each user's posts will definitely make it easier to manage and query the data.
HA
Haydee 2 years ago
↳ replying to Filiberto
I agree, option C seems like the best choice for organizing the data efficiently.
MI
Micheline 2 years ago
I think option C is the best choice because it allows for easy access to a user's posts within their profile.
0/2000 characters

Save Cancel