您当前的位置:首页 > 青岛理工大学-济宁成人高考报名济宁成人高考报名15315377317

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

济宁学历提升服务电话15315377317

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 fe2★济宁成人高考报名电话0537-2229526

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

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

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

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

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

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

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

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

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

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

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

fe2★济宁成人高考报名电话0537-2229526

推荐资讯
相关文章
    无相关信息
栏目更新
栏目热门
网站备案号:鲁ICP备18055555号-1
1