… … …… …… …… …… …… …… :……号……O…学…O …… …… ……O… …O …… …… … …线 线O :…名…O姓…… …订… 订O … …O …… …装… 装O …:…O 级……班 … ……O………O……………O………O…………O……绍兴文理学院元培学院2010学年 2 学期 专业 级《数据库 》重修试卷B
标准答案及评分标准
一、判断题(共10小题,每小题1分,共10分)
1、错2、对3、对4、对5、对6、对7、错8、对9、对10、错 二、单选题(20小题,每小题2分,共40分)
1、C 2、A 3、A 4、A 5、A 6、D 7、D 8、B 9、C 10、A 11、A 12、C 13、B 14、B 15、A 16、D 17、B 18、A 19、B 20、D 三、填空题(10空,每空2分,共20分)
1、数据库 2、1MB 3、磁盘设备 4、drop database 5、select top 6 * from student 6、count() 7、事务日志8、数据库 9、BOF 10、Delete触发器
四、查询语句(共4小题,每小题4分,共16分)
1、Delete from Score
Where Stu_No in
(Select Stu_No from student Where class_No=2011003)
2、Select Stu_No From Score Where Score <0 Group By Stu_No Having count (*>=2) 3、Select * From Student
Where Birth Between ‘1982-01-01’And‘1986-01-01’ And Stu_Sex=‘男 ’ Order By Birth DESC
4、Select Stu_No,Stu_Name, Stu_Sex,Class_Name,Depart_Name
From Student,Class,Department Where Student.Class_No =Class.Class_No
And Class. Depart_NO = Department.Depart_NO
或
Select Stu_No, Stu_Name, Stu_Sex, Class_Name, Depart_Name
… … ……………………………………O……
From Student Join Class
on Student.Class_No =Class.Class_No Join Department
On Class. Depart_NO = Department.Depart_NO 五、程序题(2题,每7分,共14分) 1、Use Students Go
Create procedure Score_Num @Cou_No varchar(8), @Count int output AS
Select @Count=Count(*) From Score Where Cou_No=@ Cou_No 2、Use Students Go
Create trigger StudentDelete On Student After Delete As
Delete from Score Where Stu_No in
(select Stu_No from Deleted)