create table borrower(
姓名 char[20] not null,
系名 char[10],
班级 char[10])
create table loans(
借书证号 char[5],
图书登记号 char[6],
结束日期 DATE,
primary key(借书证号,图书登记号),
foreign key(借书证号) reference borrower(借书证号),
foreign key(图书登记号 reference books(图书登记号))
create table books(
索书号 char[10],
书名 char[20],
图书登记号 char[6] primary key,
出版社 char[20],
价格 smallint))
(1)
select borrower.借书证号,姓名,系名,temp.total as 借书数量
from borrower,(select 借书证号,count(图书登记号) as total
from loans group by 借书证号
where tatal>5 as temp(借书证号,total))
(2)
select borrower.姓名,系名,书名,结束日期
from borrower,loans,books
where borrower.借书证号=loans.借书证号
and books.图书登记号=loans.图书登记号
and 书名 in(selcet 书名
from borrower,loans,books
where borrower.借书证号=loans.借书证号
and books.图书登记号=loans.图书登记号
and 姓名='赵垒')
(3)
create view SB
as
select borrower.借书证号,姓名,班级,books.图书登记号,书名,出版社
,借书日期
from borrower,book,loans
where borrower.借书证号=loans.借书证号
and books.图书登记号=loans.图书登记号
and 系名='信息系'
1
create table student(
sno char[10] primary key,
sname char[20] not null,
ssex char[2],
sage smallint check( sage between 16 and 30),
sdept char[4])
create table course(
cno char[10] primary key,
cname char[20] not null,
cteacher char[20])
create table sc(
sno char[10],
cno char[10],
grade smallint check(grade is null or grade between 0 and
100),
primary key(sno,cno)
foreign key sno reference student(sno),
foreign key cno reference course(cno))
2
insert into student values('102','李四','男',16,'数学')
下同
insert into course values('203',' *** 作系统','程羽')
下同
insert into sc values('101','203',82)
下同
3
(1) select cname,grade
from sc,student,course
where student.sno=sc.sno and course.cno=sc.cno
and sname='张三'
(2) select sname from student
where sno in(select sno from sc x
where not exists(
select * from sc y
where x.sno=y.sno
and y.grade<60))
(3) select cname,sname,grade
from student,course sc,(select cno,max(grade) from sc group by cno
as temp(cno,max))
where student.sno=sc.sno and course.cno=sc.cno
and grade=max and course.cno=temp.cno
4
delete * from sc where grade<60
5
update sc
set grade=(select avg(grade) from sc where cno='203')
where sno=105
仅供参考
●假设某硬盘由5个盘片构成(共有8个记录面),盘面有效记录区域的外直径为30cm,内直径为10cm,记录位密度为250位/mm,磁道密度为16道/mm,每磁道分16个扇区,每扇区512字节,则该硬盘的格式化容量约为(2)MB。
● (3)是指按内容访问的存储器。
(3)A.虚拟存储器B.相联存储器
C. 高速缓存(Cache) D. 随机访问存储器 阅读下列说明,回答问题1和问题2,将解答填入答题纸的对应栏内。
【说明】
假设某大型商业企业由商品配送中心和连锁超市组成,其中商品配送中心包括采购、财务、配送等部门。为实现高效管理,设计了商品配送中心信息管理系统,其主要功能描述如下:
1. 系统接收由连锁超市提出的供货请求,并将其记录到供货请求记录文件。
2. 在接到供货请求后,从商品库存记录文件中进行商品库存信息查询。如果库存满足供货请求,则给配送处理发送配送通知;否则,向采购部门发出缺货通知。
3. 配送处理接到配送通知后,查询供货请求记录文件,更新商品库存记录文件,并向配送部门发送配送单,在配送货品的同时记录配送信息至商品配送记录文件。
4. 采购部门接到缺货通知后,与供货商洽谈,进行商品采购处理,合格商品入库,并记录采购清单至采购清单记录文件、向配送处理发出配送通知,同时通知财务部门给供货商支付货款。该系统采用结构化方法进行开发,得到待修改的数据流图(如图1-1所示)。
【问题1】(8分)
使用【说明】中的词语,给出图 1-1 中外部实体 E1 至 E4 的名称和数据存储 D1 至D4的名称。
【问题2】(7分)
图 1-1 中存在四处错误数据流,请指出各自的起点和终点;若将上述四条错误数据流删除,为保证数据流图的正确性,应补充三条数据流,请给出所补充数据流的起点和终点。(起点和终点请采用数据流图1-1中的符号或名称) 数据库系统工程师2009年上半年软考真题,详情请参见参考资料 。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)