I was wondering what the best way of storing friend relationship data using MongoDB is?
Coming from mysql I had a separate table with friend relationships that had two foreign keys, each pointing to a friend in the "friendship" however, with MongoDB its possible to have arrays of references or even embedded documents..so whats the best way to store these relationships
Immediate first reaction was that I'd store an array of friend object ids in each user, however, that troubles me, because then, in order to remove a "friendship" I would have to do deletes on both friend's documents whereas if I stored the relationship in a separate collection (a la SQL) i could remove or add a relationship by just modifying one collection.
Thanks!