A schema design question

I am trying to design a schema, and I have two fields user(parent) and projects (child) that normalize to each other. However, I came across a question of should parent and child both store each other’s Id, or just let the parent store all its children ids, without letting the child to store its parent’s id? What are the pros and cons for both approach? Things that I can aware of the first case might have a easy time in doing aggregation or map-reduce in database, but require some extra space? Thank you in advance :slight_smile:

You should read the Designing your data schema section of the Meteor Guide - it covers this. You’ll also see why you might want to split your schema up to keep your “user” collection separate from its associated “projects” collection (otherwise any change to a project will send the entire set of projects over the wire).

1 Like