Mongodb Permission Design Problem

  mongodb, question

Now I want to be a system, with the roles of system administrator, administrator, doctor and patient. And the authority is decreased in turn.
Now the design needs user Schema, my question is: the common parts among the four are account number, password and role name. Doctors and patients have many respective attributes, such as patient’s specific information, cases, family information, etc.
Now, how to design a NoSQL like mongodb? Is it that each user has an independent Schema, or is it that common parts are abstracted and then added separately?

You can make full use of MongoDB’s features, do not need to abstract some common points in particular, or even mix them together and distinguish them by user type. NoSQL design does not need to pay too much attention to the concept of columns (the same attributes), otherwise the advantages of NoSQL will be lost, and even later it will be found that query operation is more troublesome than SQL.