Looking for some input on the following. Hopefully this isn't too subjective for the moderators.
Just started playing with deployd.com BaaS API and have the following scenario.
If an mobile app was to have a Group object and a User, where a User could belong to many Groups and Groups have many Users (many-to-many relationship) I could design this several ways with two that I'm considering:
A)
Users [{
id: 1,
groups : {1,2,3,4}
}]
Groups [{
id: 1,
users : {1,2,3,4}
}]
And
B)
Users [{
id: 1
}]
Groups [{
id: 1
}]
UserGroups [{
id: 1,
group: 1,
user: 1,
},{
id: 2
group: 1,
user: 2,
}]
I'm leaning towards B as I can store meta-data (date a user joined the group, etc) but this seems to be more a RDBMS method and I'm wondering if I will lose any of the benefits of NoSQL by trying to create such relations.
Hypothetically speaking this mobile app would be used by thousands of mobile users simultaneously and hence choosing NoSQL versus RDBMS in the first place.