F
F
frontendo2017-08-19 17:19:07
MongoDB
frontendo, 2017-08-19 17:19:07

How to store user data in mongodb?

I want to get better acquainted with mongo through practical application. I want to save information about users and their roles in the database. That is, in sql it would be three tables users, roles, role_user. In mongo, judging by the principles of nosql, we lose tight control over relationships. And it turns out that there will be two collections of users + roles, and we will also store the connection with user roles in users in the roles property in the form of an array
Or is it only sql that is needed for such related things?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question