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.