jeanfredrik / meteor-denormalize

Provides simple methods for common denormalization tasks
13 stars 5 forks source link

CRUD many-to-many relatioships between 3 interconnected collections #13

Open lobosan opened 8 years ago

lobosan commented 8 years ago

Hi @jeanfredrik

I'm working with collection2 and simpleschema and I have 3 collections: Markets, Producers and Organizations.

Markets might have many Producers and vice versa Producers might have many Organizations and vice versa Organizations might have many Markets and vice versa

My question is, how should I design the schemas in order to perform atomic inserts, updates and deletes? so all the information is consistent and stays in sync

Thanks in advance for any help

jeanfredrik commented 8 years ago

Hi @lobosan What parts of your collections do you want to denormalize? I would recommend that you first start building your app without denormalizations and add them later when you actually need them (to make your queries simpler or increase performance).