views:

52

answers:

0

hi all

I am trying to work out the best way to store my daat using mongodb and mongomapper.

I have category and each category can be described by many attributes so length in mm, weight in kg etc.

I want each user to be able to create their own attributes to descibe a category of products.

So forexample:

user A wants to store his category "cars" with number of wheels and length of car in mm user B wants to store his category "cars" with number of wheels and length in mm and weight in kg.

The categories are the same for everyone but attributes can be different.

Should i be storing this as category collection then each cateogry contains and array of users each containing a hash of attribute anmes and units ?

Or should i be breaking this up into multiple collections somehow ?

Or is there a better way anyone can think of ?

Is it a problem with deep nesting ?

thanks alot in advancfe for help and advice. rick