云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 数据库期末综合练习题及答案

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

  • 62 次阅读
  • 3 次下载
  • 2025/12/9 19:04:41

) 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、决定因素

搜索更多关于: 数据库期末综合练习题及答案 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

) 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+

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com