0

As i am new to mongodb, I am doing a project of pharmacy management system in node and mongoDB.

I want to make a table ROLE in which i only state id and ROLE attribute {can be admin, can be customer}, and a table of user -> having attributes {id, name, contact, gender, role_id(make relation of role table to user)}.

A user can be a admin or customer at a time, there can be multiple customers...

How could i do this relationship query in database.

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jan 03 '23 at 15:24

0 Answers0