create table book(bno varchar(20) primary key,
bname nvarchar(30),
ber nvarchar(20) not null,chubanshe nvarchar(50) not null,
jiage int,leibie nvarchar(20) not null,
rukushijian datetime,
zhaungtai nvarchar(20) default '注销',
cishu int default '0');

create table reader(rno int primary key,
rname nvarchar(20),
rsex nchar(10) check (sex in('男'or'女')),
zhaungtai nvarchar(20) not null,
beizhu nvarchar(100)
);

create table borrow(bno varchar(20) primary key,
bbianhao varchar(20) not NULL,
outtime datetime not null,
intime datetime not null);

create table admin(ano VARCHAR(5) not null primary key,
aname nvarchar(10) not null,
asex nvarchar(2) not null default '男',
atitle varchar(20) not null,
apassword varchar(20)not null);