Google Cloud Professional Cloud Developer — Question 272

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?

Answer options

Correct answer: B

Explanation

The correct choice, B, is effective because it allows for a structured organization where each user's posts are easily accessible within their profile, enhancing data retrieval and management. Option A lacks the necessary structure for user posts associated with individual profiles, while option C complicates data access by nesting posts within profiles. Option D reverses the relationship by prioritizing posts over profiles, which is not suitable for the intended design.