概念模型设计:物理结构设计:publishborrowtypeadminuserID name password type <pi>Integer Variable characters (20)Variable characters (30)Variable characters (20)<M>Identifier_1...<pi>bookbooNo title type bookID writer ISBN publisher money price frameType namount damount timeOn admin introduction <pi>Variable characters (20)Variable characters (100)Variable characters (20)Variable characters (10)Variable characters (30)Variable characters (30)Variable characters (100)Variable characters (8)Variable characters (20)Variable characters (10)Variable characters (10)Variable characters (10)Variable characters (20)Variable characters (10)Variable characters (100)<M><M><M>Identifier_1...<pi>bookshopbookshopID shopname manager address phone introduction <pi>Integer Variable characters (20)Variable characters (10)Variable characters (30)Variable characters (15)Variable characters (100)<M>Identifier_1...<pi>booktypetypeNo typeName lendTime <pi>Integer Variable characters (20)Variable characters (20)<M>Identifier_1...<pi>lendlendNo readerID bookNo1bookID title writer publisher type frameType lendDate putDate borrowDate <pi>IntegerVariable characters (20)Variable characters (20)Variable characters (10)Variable characters (100)Variable characters (30)Variable characters (100)Variable characters (20)Variable characters (10)Variable characters (30)Variable characters (30)Variable characters (30)<M><M><M><M><M>Identifier_1...<pi>publisherpublisherNo publisher <pi>Integer Variable characters (100)<M>Identifier_1...<pi>readerreaderNo name sex ID type birthday cardID cardNo phine dateOn dateTo admin remark <pi>Integer Variable characters (20)Variable characters (10)Variable characters (30)Variable characters (20)Variable characters (20)Variable characters (20)Variable characters (30)Variable characters (20)Variable characters (20)Variable characters (20)Variable characters (10)Variable characters (300)<M><M><M>Identifier_1...<pi>FK_publishFK_borrowFK_type adminuserID name password type ...int varchar(20)varchar(30)varchar(20)<pk>bookbooNo userIDpublisherNo title type bookID writer ISBN publisher money priceframeType namount damount timeOn adminintroduction ...varchar(20)int int varchar(100)varchar(20)varchar(10)varchar(30)varchar(30)varchar(100)varchar(8)varchar(20)varchar(10)varchar(10)varchar(10)varchar(20)varchar(10)varchar(100)<pk><fk1><fk2>bookshopbookshopID userID shopname manager address phoneintroduction ...int int varchar(20)varchar(10)varchar(30)varchar(15)varchar(100)<pk><fk>booktypetypeNobooNo typeName lendTime ...int varchar(20)varchar(20)varchar(20)<pk><fk>lendreaderNo lendNo readerID bookNo1bookID title writer publisher typeframeType lendDate putDate borrowDate ...int int varchar(20)varchar(20)varchar(10)varchar(100)varchar(30)varchar(100)varchar(20)varchar(10)varchar(30)varchar(30)varchar(30)<pk,fk><pk>publisherpublisherNo publisher int varchar(100)<pk>readerreaderNo userID name sex ID type birthday cardID cardNo phine dateOn dateTo admin remark ...int int varchar(20)varchar(10)varchar(30)varchar(20)varchar(20)varchar(20)varchar(30)varchar(20)varchar(20)varchar(20)varchar(10)varchar(300)<pk><fk>/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 2012/1/8 20:50:10 *//*==============================================================*/ drop table if exists admin2;drop table if exists book2;drop table if exists bookshop;drop table if exists booktype2;drop table if exists lend;drop table if exists publisher;drop table if exists reader;/*==============================================================*/ /* Table: admin2 */ /*==============================================================*/ create table admin2(userIDint not null,namevarchar(20),passwordvarchar(30),typevarchar(20),primary key (userID));/*==============================================================*/ /* Table: book2 */ /*==============================================================*/ create table book2(bookNovarchar(20) not null,userIDint,publisherNoint not null,titlevarchar(100),typevarchar(20),bookIDvarchar(10) not null,writervarchar(30),ISBN varchar(30),publishervarchar(100),moneyvarchar(8),pricevarchar(20) not null,frameTypevarchar(10),namountvarchar(10),damountvarchar(10),timeOnvarchar(20),adminvarchar(10),introductionvarchar(100),primary key (bookNo));/*==============================================================*/ /* Table: bookshop */ /*==============================================================*/ create table bookshop(bookshopIDint not null,userIDint,shopnamevarchar(20),managervarchar(10),addressvarchar(30),phonevarchar(15),introductionvarchar(100),primary key (bookshopID));/*==============================================================*/ /* Table: booktype2 */ /*==============================================================*/ create table booktype2(typeNoint not null,bookNovarchar(20),typeNamevarchar(20),lendTimevarchar(20),primary key (typeNo));/*==============================================================*/ /* Table: lend */ /*==============================================================*/create table lend(readerNoint not null,lendNoint not null,readerIDvarchar(20) not null,bookNo1varchar(20),bookIDvarchar(10) not null,titlevarchar(100),writervarchar(30),publishervarchar(100),typevarchar(20) not null,frameTypevarchar(10) not null,lendDatevarchar(30),putDatevarchar(30),borrowDatevarchar(30),primary key (readerNo, lendNo));/*==============================================================*/ /* Table: publisher *//*==============================================================*/ create table publisher(publisherNoint not null,publishervarchar(100),primary key (publisherNo));/*==============================================================*/ /* Table: reader *//*==============================================================*/ create table reader(readerNoint not null,userIDint not null,namevarchar(20),sex varchar(10) default '男',ID varchar(30),typevarchar(20) not null,birthdayvarchar(20),cardIDvarchar(20),cardNovarchar(30),phinevarchar(20),dateOnvarchar(20),dateTovarchar(20),adminvarchar(10) not null,remarkvarchar(300),primary key (readerNo));alter table book2 add constraint FK_maneger foreign key (userID) references admin2 (userID) on delete restrict on update restrict;alter table book2 add constraint FK_publish foreign key (publisherNo) references publisher (publisherNo) on delete restrict on update restrict;alter table bookshop add constraint FK_mane foreign key (userID) references admin2 (userID) on delete restrict on update restrict;alter table booktype2 add constraint FK_type foreign key (bookNo) references book2 (bookNo) on delete restrict on update restrict;alter table lend add constraint FK_borrow foreign key (readerNo) references reader (readerNo) on delete restrict on update restrict;alter table reader add constraint FK_manege foreign key (userID) references admin2 (userID) on delete restrict on update restrict;。