题目内容:
在图书出版发行数据库系统中,有下列关系:出版社(编号,名称,地址,邮政编码,电话号码,联系人),编号唯一,名称不能为空。
Create table publisher(
Id char(10) primary key,
Desc char(20) not null,
Addr char(30),
Zip char(8),
Phone char(20),
Contact char(20))
图书目录(书号,书名,作者,出版社编号,价格,出版日期),每本书的书号是唯一的,且书名、出版社编号、价格、出版日期均不为空且所有图书价格均不超过200元。
Create table books(
Isdn char(30) primary key,
Title char(20) not null,
Author char(20),
Price number(6,2) not null,
Pub_date datetime not null,
Pub_id char(10),
Check (price>0 and price<200),
Foreign key pub_id references publisher(id))
发行记录(记录号,书号,客户,数量,折扣率,金额),其中记录号为顺序编号,且唯一,书号、数量和金额不为空。
Create table pubRecord(
Sequence char(20) primary key,
Isdn char(30) not null,
Customer char(30),
Discount number(5,2),
Quantity integer not null,
Amount number(8,2) not null,
Foreign key isdn references books(isdn))

关注公众号,送1000阅读点
1:点击图片或者扫二维码进入公众号,关注公众号!
2:私信发送您在66题库注册的会员号!
3:在一个小时内,您将收到充值卡
4:到点卡充值输入充值卡内容即可!
5:多关注多得!免费的呦!只要本站不倒闭,永久有效!
参考答案:【答案仅供学习,请勿对照自行用药等】
