mongodb权限设计问题
阿神
阿神 2017-04-28 09:03:38
0
1
593

现在要做一个系统,角色有系统管理员、管理员、医生和病人。且权限依次下降。
现在设计需要用户Schema,我的问题是:这4者间共同的部分有帐号、密码和角色名。而医生和病人具有很多各自的属性,如病人的具体信息、病例、家属信息等。
现在对于mongodb这种NoSQL,该如何设计呢?是每个用户独立一份Schema,还是抽象出共同的部分,然后再进行各自的补充?

阿神
阿神

闭关修行中......

reply all(1)
曾经蜡笔没有小新

You can make full use of the characteristics of MongoDB. There is no need to abstract certain commonalities. They can even be mixed together and distinguished by user type. In NoSQL design, you don’t need to pay too much attention to the concept of columns (same attributes), otherwise you will lose the advantages of NoSQL, and you will even find that query operations are more troublesome than SQL later.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!