Checkout this article for NEXTJS apps.
One to one.
One to many.
One to squillions, unspecified massive number.
Modelling data to make db faster.
Unique needs of your application.
If categories is in this category collection then return. If not then add it. Then.
Avoid joins if they can be avoided.