In what situations should I split the related data in multiple collections?

To me, to reduce redundancy it’s critical to split data that would be duplicated into a separate collection and then have a “relationship” but I know with MongoDB it’s preferred to have things within a single document if possible. But I assume that depends on the use case no? For example…

I have: rarities (each with an icon, a name), characters and skills. For this I’d normally have 3 collections, one for each and then have a relationship (in this case from characters to a rarity and then multiple skills)

From what I see on how things are done in Mongo is that all this information would be on a single collection embedded within the document. But what if I had to update the icon of a rarity, wouldn’t I need to update multiple entries?
Or what if multiple characters shared one skill, wouldn’t I need to update multiple characters skill array?

Or are these situations in which splitting onto multiple collections is desirable?

this should be your answer. really it depends, no one size fit all solution.

2 Likes