background image

  

Create table guest

   ( gno char(20) primary key,
    gname char(10) not null unique,
    gsex char(5) not null,
    address char(20) not null,

birthdate char(20) not null,

    cname char(10) not null,
    cno char(20)not null,
    gdept char(40)not null,
    cause char(30) not null

)

  对于 room 表: room(rno,rz,lx,cws,price), 建表语句为:
  

Create table room

  ( rno int(4) primary key,
   rz char(10) not null,
   lx char(10) not null,
   cws int(4) not null,
   price money(8) not null

)

对于

rzinfor 表: rzinfor (gno,gname,cause,rno,rdate,rtime,sdays,adays,yj,ffkey,

Shkey,tfdate,tftime,cost,shwp,pcje,bz),建表语句如下:
Create table rzinfor
(gno char(10) 
gname char(10) not null,
cause char(100) not null,
rno int(4),
rdate datetime(8) not null,
rtime datetime(8) not null,
sdays int(4) not null,
adays int(4) not null,
yj decimal(9) not null,
ffkey char(10) not null,
shkey char(10),
tfdate datetime(8),
tftime datetime(8),
cost decimal(9),
shwp char(30),
pcje decimal(9),
bz char(100),
primary key(gno,rno,rdate),
foreign key(gno) references guest(gno),
foreign key(rno) references room(rno)
)
对于

sysuser 表:sysuser(name pw level),建表语句如下: