您当前的位置:首页 > 资料

《数据库原理》练习题答案 一、填空题 1、层次模型 网状模型 2、不可重复读 读脏数据 3、非主属性 4、索引 聚簇 5、外模式 模式 内模式 6、实体完整新 用户自定义完整性 参

济宁企业员工技能提升补助发放中15315377317

 《数据库原理》练习题答案GFT★济宁成人高考报名0537-2229526

一、填空题GFT★济宁成人高考报名0537-2229526

1、层次模型 网状模型GFT★济宁成人高考报名0537-2229526

2、不可重复读 读脏数据GFT★济宁成人高考报名0537-2229526

3、非主属性GFT★济宁成人高考报名0537-2229526

4、索引 聚簇GFT★济宁成人高考报名0537-2229526

5、外模式 模式 内模式GFT★济宁成人高考报名0537-2229526

6、实体完整新 用户自定义完整性 参照完整新GFT★济宁成人高考报名0537-2229526

7、一致性 隔离性 持久性GFT★济宁成人高考报名0537-2229526

8、逻辑独立性 物理独立性GFT★济宁成人高考报名0537-2229526

9、自反律 增广律GFT★济宁成人高考报名0537-2229526

二、操作题GFT★济宁成人高考报名0537-2229526

1.  1SELECT CNAME FROM CUSTOMERGFT★济宁成人高考报名0537-2229526

2SELECT CNAME FROM CUSTOMER, COUNTINFO WHERE COUNTINFO.CNO=CUSTOMER.CNO AND COUNTINFO.BALANCE>20000GFT★济宁成人高考报名0537-2229526

3SELECT CNAME FROM CUSTOMER WHERE CNO IN(SELECT CNO FROM COUNTINFO WHERE BALANCE=(SELECT MAX(BALANCE) FROM COUNTINFO))GFT★济宁成人高考报名0537-2229526

4SELECT COUNTID, BALANCE FROM COUNTINFO, TRANINFO WHERE COUNTINFO.COUNTID=TRANINFO.COUNTID AND GETDATE()-TRANINFO.TDATE<=10GFT★济宁成人高考报名0537-2229526

5SELECT COUNTED, BALANCE FROM COUNTINFO, CUSTOMER WHERE COUNTINFO.CNO=CUSTOMER.CNO AND CUSTOMER.CNAME=’张三GFT★济宁成人高考报名0537-2229526

6SELECT COUNT(DISTINCE CNO) FROM COUNTINFOGFT★济宁成人高考报名0537-2229526

7UPDATE COUNTINFO SET BALANCE=BALNCE+1000 WHERE CNO=(SELECT CNO FROM CUSTOMER CNAME=’李四’)GFT★济宁成人高考报名0537-2229526

8DELETE FROM COUNTINFO WHERE COUNTED=1GFT★济宁成人高考报名0537-2229526

2.  1SELECT SNAME, CITY FROM SGFT★济宁成人高考报名0537-2229526

2SELECT JNO FROM SPJ WHERE SNO=’S1’GFT★济宁成人高考报名0537-2229526

3SELECT P.PNAME, SPJ.QTY FROM P, SPJ WHERE P.PNO=SPJ.PNO AND SPJ.JNO=’J2’GFT★济宁成人高考报名0537-2229526

4INSERT INTO SPJ VALUES(S2, J6, P4, 200)GFT★济宁成人高考报名0537-2229526

5SELECT JNAME FROM J, SPJ, S WHERE J.JNO=SPJ.JNO AND SPJ.SNO=S.SNO AND S.CITY=’上海GFT★济宁成人高考报名0537-2229526

6SELECT SNO,SUM(QTY) FROM SPJ GOUP BY SNOGFT★济宁成人高考报名0537-2229526

7UPDATE P SET COLOR=’’ WHERE COLOR=’GFT★济宁成人高考报名0537-2229526

8UPDATE SPJ SET SNO=’S3’ WHERE SNO=’S5’ ANDJNO=’J4’ AND PNO=’P6’GFT★济宁成人高考报名0537-2229526

三、设计题GFT★济宁成人高考报名0537-2229526

1.1、本题E-R图如下:(10分)GFT★济宁成人高考报名0537-2229526

 GFT★济宁成人高考报名0537-2229526

2、转化后的关系模式如下:(10分)GFT★济宁成人高考报名0537-2229526

职工(职工编号,姓名,性别,业绩,商店编号,聘期,月薪) GFT★济宁成人高考报名0537-2229526

商店(商店编号,商店名,地址) GFT★济宁成人高考报名0537-2229526

商品(商品号,商品名,价格,单价)GFT★济宁成人高考报名0537-2229526

销售(商店编号,商品号,月销量)GFT★济宁成人高考报名0537-2229526

3、每个关系模式的主码、外码如下:(10分)GFT★济宁成人高考报名0537-2229526

职工:主码是职工编号;外码是商店编号GFT★济宁成人高考报名0537-2229526

商店:主码是商品号GFT★济宁成人高考报名0537-2229526

商品:主码是项目号;外码是研究所编号GFT★济宁成人高考报名0537-2229526

销售:主码是商店编号+商品号,外码是商店编号、商品号; GFT★济宁成人高考报名0537-2229526

2.1、本题E-R图如下:(10分)GFT★济宁成人高考报名0537-2229526

GFT★济宁成人高考报名0537-2229526

推荐资讯
相关文章
    无相关信息
栏目更新
栏目热门

本站主要提供教育信息咨询服务,合作洽谈电话0537-2229526王经理

网站备案号:鲁ICP备18055555号​

2 1