【正文】
) drop table reversation go create table admin ( admin_id int not null, admin_name char(20) null, admin_password char(16) null, logins int null, last_login char(10) null, right int null, constraint PK_ADMIN primary key nonclustered (admin_id) ) go create index 權(quán)限 _FK on admin ( ) go 基于 UML 的圖書(shū)館管理系統(tǒng)建模設(shè)計(jì) 18 create table booktype ( type_id int null ) go create table books ( book_id int not null, admin_id int null, title char(20) null, type_id int null, author char(40) null, price money null, book concern char(50) null, addtime datetime null, amount int null, remain int null, constraint PK_BOOKS primary key nonclustered (book_id), constraint FK_BOOKS_管理書(shū)籍 _ADMIN foreign key (admin_id) references admin (admin_id), constraint FK_BOOKS_BOOKTYPE_BOOKTYPE foreign key () references booktype ) go create index 圖書(shū)類(lèi)型 _FK on books ( ) go create index 管理書(shū)籍 _FK on books ( admin_id ASC ) go create table reader ( reader_id int not null, reader_name char(20) null, sex char(2) null, age tinyint null, class char(15) null, address text null, memo text null, maxborrowed int null, reader_password char(16) null, right int null, constraint PK_READER primary key nonclustered (reader_id) ) go create table borrow_information ( book_id int not null, reader_id int not null, borrow_time datetime null, end_time datetime null, amount int null, return_time datetime null, constraint PK_BORROW_INFORMATION primary key (book_id, reader_id), constraint FK_BORROW_I_BORROW_IN_BOOKS foreign key (book_id) 19 references books (book_id), constraint FK_BORROW_I_BORROW_IN_READER foreign key (reader_id) references reader (reader_id) ) go create index Association_1_FK on borrow_information ( book_id ASC ) go create index Association_2_FK on borrow_information ( reader_id ASC ) go create table login ( admin_id int not null, reader_id int not null, right int null, constraint PK_LOGIN primary key (admin_id, reader_id), constraint FK_LOGIN_LOGIN_ADMIN foreign key (admin_id) references admin (admin_id), constraint FK_LOGIN_LOGIN2_READER foreign key (reader_id) references reader (reader_id) ) go create index login_FK on login ( admin_id ASC ) go crea