第一范文网 - 专业文章范例文档资料分享平台

数据库期末综合练习题及答案

来源:用户分享 时间:2025/6/27 5:40:25 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

) as begin

delete from score

where 学号=@a and 课程名=@b end

8.declare @a char(8),@b varchar(10),@c numeric(5,2) declare xxx cursor

for select 学号,课程名,成绩 from score open xxx

fetch xxx into @a,@b,@c while @@fetch_status=0 begin

print @a+replicate(' ',3)+@b+str(@c)+replicate(' ',3)+(case when @c>=90 then '优秀' when @c>=70 then '良好' when @c>=60 then '及格' else '不及格' end )

fetch from xxx into @a,@b,@c

end close xxx deallocate xxx

9.declare @a char(8),@b varchar(10) declare @c numeric(5,2) declare @d int set @d=80 declare xxx cursor

for select 学号,课程名,成绩 from score open xxx

fetch xxx into @a,@b,@c while @@fetch_status=0 begin

if(@c>=@d) print @a+replicate(' ',3)+@b+str(@c,5) fetch from xxx into @a,@b,@c end close xxx deallocate xxx

10.declare @a char(8),@b varchar(10) declare @s char(8),@r varchar(10)

set @s='20030001' set @r='数学' declare xxx cursor

for select 学号,课程名 from score open xxx

fetch xxx into @a,@b while @@fetch_status=0 begin

if(@a=@s and @b=@r) begin

delete from score where current of xxx break end

fetch from xxx into @a,@b end close xxx deallocate xxx

五、期末综合练习题参考答案

第一章 填空题

1. 分开 2. 文件系统、数据库系统

3. 记录、数据项 4. 局部、全局 5. 二元、一元 6. 多、多 7. 多、多 8. 型、值

9. 树、二维表格 10. 关系定义、DBMS 11. 状态、行为

12. 数据库管理员、数据库设计员、应用程序员、终端用户 13. 中间、最上、最下 14. 建立、维护 15. 定义、查询、更新、控制 第二章 填空题

1. 24、3 2. 超码、候选码、主码、备用码 3. 班级号、外码 4. R1、R2

5. 完整性、数据库 6. 选择、投影、连接、除 7. 2、1 8. C、X、S 9. ?

(X)、S

学生号

第三章 填空题

1. X←→Y、决定因素 2. 完全、部分 3. 学号、系主任 4. X→Y、X→Z、分解性 5. (A,D)、2 6. (A,D)、伪传递 7. 第一、不可再分 8. (A,D)、部分 9. 第一、3 10. 第二、3 11. 第三 12. BC、决定因素

搜索更多关于: 数据库期末综合练习题及答案 的文档
数据库期末综合练习题及答案.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c66mld07m9x97tl37ll5c_5.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top