当前位置:操作系统 > Unix/Linux >>

权限设计数据库结构表

核心提示:--权限许可 create table res_permission ( roleid INTEGER , resourceidvarchar2(30), operationid integer , primary key (roleid,resourceid,operationid) ) --角色定义 create table res_role ( roleid INTEGER , rolenamevarchar2(30), roledescvarchar

 
  1. --权限许可      
  2. create table res_permission      
  3. (      
  4.  roleid      INTEGER,      
  5.  resourceid  varchar2(30),      
  6.  operationid integer,      
  7.  primary key(roleid,resourceid,operationid)      
  8. )      
  9.      
  10.      
  11. --角色定义      
  12. create table res_role      
  13. (      
  14.  roleid      INTEGER,      
  15.  rolename    varchar2(30),      
  16.  roledesc    varchar2(100),      
  17.  primary key(roleid)      
  18. )      
  19.      
  20. --角色权限      
  21. create table res_userrole      
  22. (      
  23.  roleid      INTEGER,      
  24.  userid      varchar2(30),--用户名      
  25.  primary key(roleid,userid)      
  26. )      
  27.      
  28. --资源      
  29. create table res_resource      
  30. (      
  31.  resourceid      varchar2(20),      
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,