Still unsure on the pros and cons of relationship for building a reddit like app
should i be designing one-to-many for post to comments and one-to-one for user to comment.
will this give any benefit?
TL;DR
Developers are discussing the benefits of relationships in database design for a Reddit-like app. Storing `IDs` of related docs in the document is recommended for performance. Use one-to-many for post to comments and one-to-one for user to comment for best results.
Darshan Pandya
13 Apr, 2025, 07:31
Relationships are very experimental and can have performance bottlenecks. It'd better to store the IDs of the related docs in the document.