用户和角色管理 [英] user & role management
问题描述
我正在开发一个带有Web界面的Winform程序.
我有3种类型的用户:雇员,客户和Office用户.
我希望有一个稳定且高性能的解决方案,可以与用户和角色管理一起使用.
那么什么是最好的:
-1个包含所有用户信息的大表
-1个具有公共字段的表和一个具有类型特定信息的表/类型
...以及如何管理用户角色的
在第一个选项中,将有许多空白字段,关于性能如何?
Hi,
I am working on a winform program with also a webinterface.
I have 3 types off users: Employee''s, Customers and Office users.
I want to have a stable and performant solution u work with user and role management.
So what''s best:
- 1 big table with all the user information
- 1 table with common fields and a table/type with type specific information
... and how do i manage the user role''s
In the first option there will be many blank fields, what about performance
Thanks
推荐答案
-1个包含所有用户信息的大表
- 1 big table with all the user information
好吧,这违反了数据库规范化规则,因此应该正确并真正避免使用它.
为什么不看看角色和成员资格提供者 [ ^ ]?最初,它们被设计用于网站,但是您可以将它们与桌面应用程序一起使用.他们照顾用户及其角色.
Well, that breaks DB normalisation rules so it should be well and truly avoided.
Why don''t you take a look at the role and membership providers[^] as provided by Microsoft? Initially they were designed to be used with websites, but you can use them with desktop applications. They take care of users and their roles.
这篇关于用户和角色管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!