0

我正在使用 SQL SERVER 2008 R2 和 Visual Studio .NET 4 C#

我有著名的 USERS 表。考虑它的设计:

UserID
Username
Password
UsertypeID  -- this is a foreign key, linked to 'UserTypes' table to distinguish between super admins, admins, and dummy users

我想向名为“CreatorID”的用户添加一个新字段。这样做的原因是每个“虚拟用户”都将由管理员创建,我想知道那个管理员。那么 USERS 表设计会是这样的:

UserID
Username
Password
UsertypeID  -- this is a foreign key, linked to 'UserTypes' table to distinguish between super admins, admins, and dummy users
CreatorID

所以,我的目的是我即将在同一个 USERS 表中的“CreatorID”和“UserID”之间建立一对多的关系(使用 SQL SERVER 2008),但我有点担心(因为这是第一个时间我做这样的事情)。这样做有什么缺点吗?SQL SERVER 2008 对这种关系有什么问题吗?这是满足我需求的最合适方法吗?

我感谢您对此目的的详细说明。谢谢,

4

0 回答 0