R
R
rusline2017-10-07 16:18:25
MongoDB
rusline, 2017-10-07 16:18:25

How to build a database architecture in a web application?

I want to write a mini social in the form of a test. network on node js. The only problem is that I haven’t found anywhere how to roughly build a database architecture for mongodb. For relational tables, I would use something like this: there is a table of the user, posts, comments, messages, rooms for communicating with the user (s).
And I would link them like this: in the post I would add user_id and link; for messages, I would store the room id and a separate table that would connect user_id and room_id. Approximately something like that. But for non-relational models, I had a question of how to write the optimal database architecture.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2017-10-07
@dimonchik2013

put it all together
stock-vector-shit-polygonal-vector-37322

P
Ptolemy_master, 2017-10-07
@Ptolemy_master

The same is true for non-relational databases. Mongoose, by the way, was created just for this - it allows you to create schemas for schemaless databases, linking collections together with almost no effort.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question