日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)建SQL角色與權(quán)限用到的五個數(shù)據(jù)庫表

下文為您列舉的五張表是在創(chuàng)建SQL角色與權(quán)限時(shí)需要用到的,如果您在創(chuàng)建SQL角色等方面遇到過問題,不妨一看,對您會有所啟迪。

創(chuàng)新互聯(lián)專注于韶關(guān)網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供韶關(guān)營銷型網(wǎng)站建設(shè),韶關(guān)網(wǎng)站制作、韶關(guān)網(wǎng)頁設(shè)計(jì)、韶關(guān)網(wǎng)站官網(wǎng)定制、微信小程序開發(fā)服務(wù),打造韶關(guān)網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供韶關(guān)網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。

創(chuàng)建SQL角色與權(quán)限要用到五張數(shù)據(jù)庫表:
1,SQL用戶信息表

 
 
 
  1. create table employee  
  2. (  
  3.    userid varchar(50) not null,  --用戶ID  
  4.    username varchar(100),    --用戶名  
  5.    userpassword varchar(100), --密碼  
  6.    ..  
  7.    ..  
  8.    ..  
  9.    ..  
  10. )  
  11. alter table employee        --主鍵  
  12. add constraint pk_employee_userid primary key (userid) 

2,SQL角色表

 
 
 
  1. create table role  
  2. (  
  3.   roleid varchar(50) not null, --角色I(xiàn)d  
  4.   rolename varchar(100),        --角色名稱  
  5. )  
  6. alter table tole     --主鍵  
  7. add constraint pk_role_roleid primary key (roleid) 

3,SQL權(quán)限表

 
 
 
  1. create table popedom  
  2. (  
  3.   popedomid int identity(1,1) not null, --權(quán)限Id  
  4.   popedomname varchar(100), --權(quán)限名稱  
  5.   popedomfatherid int,      --權(quán)限父ID  
  6.   popedomurl varchar(100)   --樹的連接路徑  
  7.   ..  
  8.   ..  
  9. )  
  10. er table popedom       --主鍵  
  11. add constraint PK_popedom primary key (popedomid)   

添加數(shù)據(jù)如
insert into popedom values('我的辦公桌',0,'')
insert into popedom values('電子郵箱',1,'../mail/EmaiolManage.aspx')
(添加數(shù)據(jù)的原則是一級接點(diǎn)的popedomfatherid 為0,如果是(我的辦公桌)下面的接點(diǎn),它們的popedomfatherid為(我的辦公桌)的主鍵)

4,用戶與角色關(guān)系表

 
 
 
  1. create table user_role  
  2. (  
  3.  connectionid int identity(1,1) not null, --關(guān)系ID  
  4.   userid varchar(50) not null,   --管理員表ID  
  5.   roleid varchar(50) not null   --角色I(xiàn)d  
  6. )  
  7. alter table user_role    --主鍵  
  8. add constraint PK_admin_role primary key(connectionid)   

5,角色與權(quán)限關(guān)系表

 
 
 
  1. create table role_popedom     --角色與權(quán)限表  
  2. (  
  3.   connectionid int identity(1,1), --關(guān)系Id  
  4.   roleid varchar(50) not null,      --角色I(xiàn)D  
  5.   popedomid int not null,   --權(quán)限Id  
  6.   popedom    int   --權(quán)限 (1為可用,2為不可用)  
  7. )  
  8. alter table role_popedom       --主鍵  
  9. add constraint PK_role_popedom primary key(connectionid) --主鍵  

分享題目:創(chuàng)建SQL角色與權(quán)限用到的五個數(shù)據(jù)庫表
轉(zhuǎn)載注明:http://www.5511xx.com/article/ccioidh.html