没有合适的资源?快使用搜索试试~ 我知道了~
数据库系统基础教程第五章答案.docx
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 58 浏览量
2022-07-14
20:19:40
上传
评论
收藏 24KB DOCX 举报
温馨提示
试读
16页
数据库系统基础教程第五章答案.docx
资源推荐
资源详情
资源评论
As a set:
speed
As a bag:
speed
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
As a set:
bore
15
16
14
18
As a bag:
bore
15
16
14
16
15
15
14
18
π
bore
(Ships Classes)
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 appearn + m times. The further union of bag T with the tuple t
appearing o times will have tuple t appear n + m + otimes 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 tuplet 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.
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( n, m ) times. The further intersection of bag
T with the tuple t appearing o times will produce tupletmin( o, min( n, m ) ) 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 intersection of
bags R and S will have tuple t appear min( m, o ) times. The further intersection of bag R
with the tuple t appearing n times will produce tupletmin( n, min( m, o ) ) times in the
final result.
The intersection of bags R,S and T will yield a result where tuple t appears min( n,m,o) times.
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.
For bags:
On the left-hand side:
Given that tuple r in R, which appears m times, can successfully join with tuple s in S,
which appears n times, we expect the result to contain mn copies. Also given that tuple t
in T, which appears o times, can successfully join with the joined tuples of r and s, we
expect the final result to have mno copies.
On the right-hand side:
Given that tuple s in S, which appears n times, can successfully join with tuple t in T,
which appears o times, we expect the result to contain no copies. Also given that tuple r
in R, which appears m times, can successfully join with the joined tuples of s and t, we
expect the final result to have nom copies.
The order in which we perform the natural join does not matter for bags.
For sets:
This is a similar case when dealing with bags except the joined tuples can only appear at most
once in each result. If there are tuples r,s,t in relations R,S,T that can successfully join, then the
result will contain a tuple with the schema of their joined attributes.
For bags:
剩余15页未读,继续阅读
资源评论
celkhn5460
- 粉丝: 0
- 资源: 4万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功