tojava

BlogJava 首页 新随笔 联系 聚合 管理
  17 Posts :: 6 Stories :: 55 Comments :: 0 Trackbacks

CREATE TABLE ACL_SID(ID bigint(20)  NOT NULL auto_increment,
PRINCIPAL tinyint(1) NOT NULL,
SID varchar(45) NOT NULL,
constraint UNIQUE_UK_1 unique key(SID,PRINCIPAL)
PRIMARY KEY  (`id`)
)

CREATE TABLE ACL_OBJECT_IDENTITY(ID bigint(20)  NOT NULL auto_increment,
OBJECT_ID_CLASS bigint(20) NOT NULL,
OBJECT_ID_IDENTITY bigint(20) NOT NULL,
PARENT_OBJECT bigint(20),
OWNER_SID bigint(20),
ENTRIES_INHERITING tinyint(1) NOT NULL,
CONSTRAINT UNIQUE_UK_3 unique key(OBJECT_ID_CLASS,OBJECT_ID_IDENTITY),
CONSTRAINT FOREIGN_FK_1 FOREIGN KEY(PARENT_OBJECT)REFERENCES ACL_OBJECT_IDENTITY(ID),
CONSTRAINT FOREIGN_FK_2 FOREIGN KEY(OBJECT_ID_CLASS)REFERENCES ACL_CLASS(ID),
CONSTRAINT FOREIGN_FK_3 FOREIGN KEY(OWNER_SID)REFERENCES ACL_SID(ID)
PRIMARY KEY  (`id`)
)

CREATE TABLE ACL_ENTRY(ID bigint(20)  NOT NULL auto_increment,
ACL_OBJECT_IDENTITY BIGINT(20) NOT NULL,
ACE_ORDER INT(11) NOT NULL,
SID BIGINT(20) NOT NULL,
MASK INTEGER NOT NULL,
GRANTING BOOLEAN NOT NULL,AUDIT_SUCCESS BOOLEAN NOT NULL,
AUDIT_FAILURE BOOLEAN NOT NULL,
CONSTRAINT UNIQUE_UK_4 UNIQUE(ACL_OBJECT_IDENTITY,ACE_ORDER),
CONSTRAINT FOREIGN_FK_4 FOREIGN KEY(ACL_OBJECT_IDENTITY) REFERENCES ACL_OBJECT_IDENTITY(ID),
CONSTRAINT FOREIGN_FK_5 FOREIGN KEY(SID) REFERENCES ACL_SID(ID)
PRIMARY KEY  (`id`)
)

CREATE TABLE USERS(USERNAME varchar(50) NOT NULL ,
PASSWORD varchar(50) NOT NULL,
ENABLED BOOLEAN NOT NULL
PRIMARY KEY  (USERNAME)
)
           

 CREATE TABLE AUTHORITIES(USERNAME varchar(50) NOT NULL,
 AUTHORITY varchar(50) NOT NULL,
 CONSTRAINT FK_AUTHORITIES_USERS FOREIGN KEY(USERNAME) REFERENCES USERS(USERNAME));
 
CREATE UNIQUE INDEX IX_AUTH_USERNAME ON AUTHORITIES(USERNAME,AUTHORITY
)


CREATE TABLE CONTACTS(ID BIGINT(20) NOT NULL PRIMARY KEY, CONTACT_NAME varchar(50) NOT NULL,
EMAIL varchar(50) NOT NULL)
PRIMARY KEY  (`id`)

CREATE TABLE Productions(ID BIGINT(20) NOT NULL ,
contactid BIGINT(20) NOT NULL,
production_NAME varchar(50) NOT NULL,
EMAIL varchar(50) NOT NULL
PRIMARY KEY  (`id`)
)


       

posted on 2007-04-13 17:58 l like life i like java 阅读(439) 评论(2)  编辑  收藏 所属分类: DB

Feedback

# re: ACEGI 1.03 mysql sql[未登录] 2007-06-21 20:25 dd
http://dev.puchbauer.com/extui/extUi  回复  更多评论
  

# re: ACEGI 1.03 mysql sql[未登录] 2007-06-21 21:03 dd
http://topic.csdn.net/t/20061215/10/5232374.html  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: