数据库系统基础教程第五章答案

Exercise 5.1.1

As a set:

speed 2.66 2.10 1.42 2.80 3.20 2.20 2.00 1.86 3.06

Average = 2.37

As a bag:

speed 2.66 2.10 1.42 2.80 3.20 3.20 2.20 2.20 2.00 2.80 1.86 2.80 3.06

Average = 2.48

Exercise 5.1.2

As a set:

hd 250 80 320 200 300 160

Average = 218

As a bag:

hd 250 250 80 250 250 320 200 250 250 300 160 160 80

Average = 215

Exercise 5.1.3a

As a set:

bore 15 16 14 18

As a bag:

bore 15 16 14 16 15 15 14 18

Exercise 5.1.3b

πbore(Ships Classes)

Exercise 5.1.4a

For bags:

On the left-hand side:

Given bags R and S where a tuple t appears n and m times respectively, the union of bags R and S will have tuple t appear n + m times. The further union of bag T with the tuple t appearing o times will have tuple t appear n + m + o times in the final result. On the right-hand side:

Given bags S and T where a tuple t appears m and o times respectively, the union of bags R and S will have tuple t appear m + o times. The further union of bag R with the tuple t appearing n times will have tuple t appear m + o + n times in the final result.

For sets:

This is a similar case when dealing with bags except the tuple t can only appear at most once in each set. The tuple t only appears in the result if all the sets have the tuple t. Otherwise, the tuple t will not appear in the result. Since we cannot have duplicates, the result only has at most one copy of the tuple t.

Exercise 5.1.4b

For bags:

On the left-hand side:

Given bags R and S where a tuple t appears n and m times respectively, the intersection of bags R and S will have tuple t appear min

>>闂傚倸鍊搁崐宄懊归崶顒夋晪鐟滃繘骞戦姀銈呯婵°倐鍋撶痪鎯ь煼閺岋綁骞囬锝嗏挅濠电偛妯婃禍婊堝礃閳ь剙顪冮妶鍡楀Ё缂傚秴妫楀玻鍧楁偄閸忓皷鎷虹紒缁㈠幖閹冲繗銇愯缁辨帡鎮╅崘鑼患缂備緡鍠栭悧鎾崇暦閹烘鍊烽悗鐢登圭敮鎯р攽閻樺灚鏆╁┑顔碱嚟閹广垹螣娓氼垳鈧埖銇勯弴妤€浜鹃梺鍝勭焿缁查箖骞嗛弮鍫晬婵炴垶锕╂导锟�<<
12@gma联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4