数据库系统概论试题及答案9(7)
时间:2025-07-11
时间:2025-07-11
数据库系统概论试题及答案共十套
五、综合题(共20分)
1、 仓库号(1分) 零件号(1分) 2、 建立仓库表
Create table warehouse
(
wno varchar(10) primary key, wname varchar(20), square number(10,2), cou int)
建立零件表
Create table material
( mno varchar2(10) primary key,
mname varchar2(20), type varchar2(10), unit varchar2(10), cusnum varchar2(10), price number(10,2))
建立库存表 Create table storage
(
wno varchar2(10) foreign key references warehouse(wno), mno varchar2(10) foreign key references material(mno), storenumber number(10,2), primary key(wno,mno))
评分标准:
3个primary key各1分,2个foreign key各1分,其它1分,根据实际情况斟情扣分。
3、 用SQL表示:
select material.mno,wno,storenumber (1分,mno前无前缀不给分) from material,storage (1分,2个表任少一个不给分) where material.mno=storage.mno and mname=’螺丝’(1分,条件少一个不给分)