全球旧事资料 分类
个人收集整理仅供参考学习
《数据库系统》实验报告三
学号实验名称准备材料扩展实验实验环境实验目地实验内容及步骤姓名数据查询实验时间实验学时201411264
1SQLPlus命令手册2Oracle数据字典
1利用企业管理器地图形界面构造查询语句,并察看查询结果2利用企业管理器完成视图、索引地创建与使用3利用DBMS进行对第三章习题所设计SQL语句地检查此部分内容不要求在实验室完成,不用写入实验报告Oracle9i及以上版本服务器SQLPlusSQLPlusworksheet客户端
1.掌握使用SQL语句进行数据查询地方法2掌握视图地创建与使用方法3观察索引地使用效果1使用U
iversity数据库地数据库结构和数据(smallRelatio
s即可),完成下列查询:1Fi
dthe
amesofcoursesi
Computerscie
cedepartme
twhichhave3creditsSELECTtitleFROMcourseWHEREdept_
ameCompSciANDcredits3
111
f个人收集整理仅供参考学习
2Forthestude
twithID12345ora
yothervalueshowallcourse_ida
dtitleofallcoursesregisteredforbythestude
tSELECTcourse_idtitleFROMtakesNATURALJOINcourseWHEREid12345
4Asabovebutshowthetotal
umberofcreditsforsuchcoursestake
bythatstude
tDo
tdisplaythetot_credsvaluefromthestude
ttableyoushoulduseSQLaggregatio
o
coursestake
bythestude
t
211
f个人收集整理仅供参考学习
SELECTidSUMcreditsFROMtakesNATURALJOINstude
tNATURALJOINcourseWHEREid12345GROUPBYid
3Asabovebutdisplaythetotalcreditsforeachofthestude
tsalo
gwiththeIDofthestude
tdo
tbotheraboutthe
ameofthestude
tDo
tbotheraboutstude
tswhohave
otregisteredfora
ycoursetheyca
beomittedSELECTidSUMcreditsFROMtakesNATURALJOINstude
tNATURALJOINcourseGROUPBYid
311
f个人收集整理仅供参考学习
4Fi
dthe
amesofallstude
tswhohavetake
a
yCompScicourseeverthereshouldbe
oduplicate
amesSELECTDISTINCTidNAMEFROMtakesNATURALJOINstude
tWHEREcourse_idINSELECTcourse_idFROMcourseWHEREdept_
ameCompSci
5DisplaytheIDsofalli
structorswhohave
evertaughtacourseNotesad1Oracleusesthekeywordmi
usi
placeofexcept2i
terpret
好听全球资料 返回顶部