I am creating a model for a user entity. I work with a small team of developers and we are exchanging a lot of discussions while using the flat vs nested approach.
The premise is that the User Schema has a bunch of fields such as name, email ID, phone number, address, etc, which I would prefer mostly to be a flat model ( Except for maybe fields like address ).
We have a few more fields, Like 10 to 15 fields, and my senior is advising that we nest the fields according to some category: Such as profile_information OR contact_information or other groupings.
I would like you guys to help me in trying to understand what the drawbacks are to either of the approach. I personally don’t prefer a nested model here because I don’t see a need to group fields. My senior mentions that the reason for grouping is so that it’s easier to access the data and improves readiibility which I don’t agree with.
Also, is there any impact on the performance to nesting fields? I don’t foresee the document to grow too large.
Thanks for the help!