《《數(shù)據(jù)庫系統(tǒng)原理教學》作業(yè)講評課件2》由會員分享,可在線閱讀,更多相關《《數(shù)據(jù)庫系統(tǒng)原理教學》作業(yè)講評課件2(21頁珍藏版)》請在裝配圖網(wǎng)上搜索。
1、,單擊此處編輯母版標題樣式,.,*,單擊此處編輯母版文本樣式,第二級,第三級,第四級,第五級,單擊此處編輯母版標題樣式,單擊此處編輯母版文本樣式,第二級,第三級,第四級,第五級,.,*,作業(yè)講評,2.4.1,p29,1,.,2.4.1 a,哪些型號的,PC,速度大于,3.00,?,model,(,speed3.00,(PC),2,.,2.4.1 b,maker,(Product,hd100,(Laptop),wrong,3,.,2.4.1 b,maker,(,type=laptop,(Product),maker,(,hd100,(Laptop)Product),4,.,2.4.1 c,mod
2、el,price,(,(,maker=B,(Product PC Laptop Printer),),wrong,.,2.4.1 c,model,price,(,maker=B,(Product)PC),model,price,(,maker=B,(Product)Laptop),model,price,(,maker=B,(Product)Printer),6,.,2.4.1 d,model,(,color=true AND type=laser,(Printer),7,.,2.4.1 e,maker,(,type=laptop,(Product),maker,(,typepc,(Produ
3、ct),wrong,8,.,2.4.1 e,maker,(,type=laptop,AND,typepc,(Product),Wrong,9,.,2.4.1 e,maker,(,type=laptop,(Product),typepc,(Product),),Wrong,10,.,2.4.1 e,maker,(,type=laptop,(Product),maker,(,type=pc,(Product),11,.,2.4.1 f,查詢在一種或者兩種,PC,機中出現(xiàn)的硬盤的容量,=,查詢在不超過兩種,PC,機中出現(xiàn)的硬盤的容量,12,.,2.4.1 f,查詢在至少兩種,PC,機中出現(xiàn)的硬盤的容
4、量,R1(model,hd):=,model,hd,(PC),R2(model,hd):=,model,hd,(PC),Answer(hd):=,R1.hd,(R1 R2 ),R1.hd=R2.hd AND R1.model R2.model,13,.,2.4.1 f,查詢在至少,3,種,PC,機中出現(xiàn)的硬盤的容量,R1(model,hd):=,model,hd,(PC),R2(model,hd):=,model,hd,(PC),R3(model,hd):=,model,hd,(PC),R4(hd):=,R1.hd,(R1 R2 R3),R1.hd=R2.hd AND R1.model R2.
5、model,R2.hd=R3.hd AND R2.model R3.model,Wrong,非傳遞關系 考慮,R1=R3 R2,14,.,2.4.1 f,查詢在至少,3,種,PC,機中出現(xiàn)的硬盤的容量,R1(model,hd):=,model,hd,(PC),R2(model,hd):=,model,hd,(PC),R3(model,hd):=,model,hd,(PC),R4(hd):=,R1.hd,(R1 R2 R3),R1.hd=R2.hd AND R1.modelR2.model,R2.hd=R3.hd AND R2.modelR3.model,15,.,2.4.1 f,查詢在不超過兩
6、種,PC,機中出現(xiàn)的硬盤的容量,Answer(hd):=,hd,(PC)R4,16,.,2.4.1 g,R1(model,speed,ram):=,model,speed,ram,(PC),R2(model,speed,ram):=,model,speed,ram,(PC),Answer(R1.model,R2.model):=,R1.,model,R2.,model,(R1 R2),R1.speed=R2.speed AND R1.ram=R2.ram,AND R1.model 2.8,(PC)product,),maker,model,(,speed2.8,(Laptop)product,
7、),R2:=R1,Answer(maker):=,R1.maker,(R1 R2),R1.,maker,=R2.,maker,AND R1.model R2.Model,18,.,2.4.1 j,R1(maker,speed):=,maker,speed,(PC product),maker,speed,(,Laptop product,),R2:=R1,R3:=R1,Answer(maker):=,R1.maker,(R1 R2 R3),R1.,maker,=R2.,maker,AND R1.,speed,R2.,speed,R2.,maker,=R3.,maker,AND R2.,spee
8、d,R3.,speed,19,.,2.4.1k,至少生產(chǎn),3,種型號,PC,的廠商,R1(maker,model):=,maker,model,(,type=PC,(Product),),R2:=R1,R3:=R1,R4:=R1,R5(maker):=,R1.,maker,(R1 R2 R3),R1.,maker,=R2.,maker,AND R1.,model,R2.,model,R2.,maker,=R3.,maker,AND,R2.,model,R3.,model,20,.,2.4.1k,續(xù),至少生產(chǎn),4,種型號,PC,的廠商,R6(maker):=,R1.,maker,(R1 R2 R3 R4),R1.,maker,=R2.,maker,AND R1.,model,R2.,model,R2.,maker,=R3.,maker,AND R2.,model,R3.,model,R3.,maker,=R4.,maker,AND R3.,model,R4.,model,恰好生產(chǎn),3,種型號,PC,的廠商,Answer(maker):=R5 R6,21,.,