Q53 [Scenario]: Design a data schema for a Twitter-like follower system where users can have millions of followers.
Do NOT embed followers inside an array in the User document (followers: [ObjectId]), as it will breach the 16MB limit and cause massive document relocation. Instead, use a Bucket Pattern or a Separate Outlier Collection (Follow collection with indexed { followerId, followeeId }), or bucket 1000 follower references per document.
Key Takeaways
Avoid embedding unbounded arrays in single documents.
Use normalized target collections or the Bucket Pattern for massive 1-to-N relationships.
Knowledge Check
What issue arises if a celebrity user's 10 million followers are stored as ObjectIds in a single array field?