How to build the architecture of a database in a web application?
Want in the form of a test to write mini social. network with node js. The only problem is that almost nowhere to be found about how to build the architecture of the database for mongodb. For relational tables around I would use this: a table user, posts, comments, messages, rooms to communicate with user(s).
And I would connect them like this: in the post I added user_id and linked; for messages I would store the id of the room and another table to link the user_id and room_id. About something like that. But for non-relational models I have a question how to write optimal architecture of the database.