Skip to content

Instantly share code, notes, and snippets.

@ephekt
Created February 4, 2012 00:44
Show Gist options
  • Save ephekt/0b087f8a929333570b3a to your computer and use it in GitHub Desktop.
Save ephekt/0b087f8a929333570b3a to your computer and use it in GitHub Desktop.
sample mongo schema
people {
mike_r {
tags:{}
notes:{}
crunchbase_profile:foreign_key to permalink__last_updated_date
}
matt_j {
tags:{}
notes:{}
crunchbase_profile:foreign_key to permalink__last_updated_date
}
}
crunchbase_profiles {
miker_r__last_updated
...
...
...
}
@mjeffryes
Copy link

I think we can just have one top level collection like this:

people {
  mike_r {
    tags:{}
    notes:{}
    crunchbase_profiles: [ {time: <most_recent_update>, <profile_keys>... }, {time: ##, <changed_profile_keys>... }, ...]
  }
  matt_j {
    tags:{}
    notes:{}
    crunchbase_profiles: [ {time: <most_recent_update>, <profile_keys>... }, {time: ##, <changed_profile_keys>... }, ...]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment