用户权限与角色设计


User and Rol Matance e Data Design

 

 



 

 

Table Name

UserRole   relations of user and role

Column

note

DataType

IsNull

Key

id

Auto

int

NOT NULL

PRIMARYKEY

userGroupId

 

Int

NOT NULL

not

roleGradeId

 

int

NOT NULL

Not

addition

no

 

Table Name

UserGroup

Column

note

DataType

IsNull

Key

id

Auto

int

NOT NULL

PRIMARYKEY

name

 

Nvarchar(50)

NOT NULL

not

 

 

 

 

 

addition

no

 

Table Name

Userinfo

Column

note

DataType

IsNull

Key

id

Auto

int

NOT NULL

PRIMARYKEY

name

 

Nvarchar(50)

NOT NULL

not

password

 

Nvarchar(50)

NOT NULL

Not

guid

 

Nvarchar(50)

NOT NULL

Not

userGroupID

 

int

NOT NULL

Not

addition

Now one user can in one usergroup only.

 

Table Name

RoleGrade

Column

note

DataType

IsNull

Key

id

Auto

int

NOT NULL

PRIMARYKEY

name

 

Nvarchar(50)

NOT NULL

not

addition

no

 

Table Name

RoleInfo

Column

note

DataType

IsNull

Key

id

Auto

int

NOT NULL

PRIMARYKEY

roleId

 

int

Not null

not

name

 

Nvarchar(50)

NOT NULL

not

RoleGradeID

 

int

NOT NULL

Not

pageId

 

int

NOT NULL

Not

isRead

 

bool

NOT NULL

Not

isAdd

 

bool

NOT NULL

Not

isDel

 

bool

NOT NULL

Not

isUpdate

 

bool

NOT NULL

Not

isLock

 

bool

NOT NULL

Not

addition

Roleid maybe repeat.

 

 

posted on 2010-12-08 12:21  咖啡色  阅读(594)  评论(0编辑  收藏  举报