没有合适的资源?快使用搜索试试~ 我知道了~
数据库管理系统概述英文版课件:12 Join Algorithm.ppt
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 68 浏览量
2022-06-20
23:06:41
上传
评论
收藏 271KB PPT 举报
温馨提示
试读
30页
数据库管理系统概述英文版课件:12 Join Algorithm.ppt
资源推荐
资源详情
资源评论
COMP231 1
COMP231
Join Algorithm
Prepared by Raymond Wong
Presented by Raymond Wong
COMP231 2
Example
Consider the following SQL query.
E.g., student (sid, sname, age)
take (sid, cid)
select sname
from student S, take T
where S.sid = T.sid
COMP231 3
Example
Assuming the following table sizes:
Student: 500 pages, 80 tuples/page, 50
bytes/tuple
Take: 1000 pages, 100 tuples/page, 40
bytes/tuple
Assume that there are 200 courses in table Take
Student: 500 pages, 80 tuples/page, 50 bytes/tuple
Take: 1000 pages, 100 tuples/page, 40 bytes/tuple
- 200 courses in table Take
- 1, 2, …, 40 in attribute Age
of table Student
COMP231 4
Outline
Simple-Nested Loop Join
Block-Nested Loop Join
Sort-Merge Join
Index-Nested Loop Join
Hash Join
COMP231 5
Simple-Nested Loop Join
For each page p of T (T is called outer relation)
for each page q of S (S is called inner relation)
for each tuple t p and each tuple s q
such that t.sid = s.sid
output <t, s> to the output
0005
0005
0002
0002
0004
0004
0002
0002
0002
0002
0001
0001
0005
0005
0005
0005
0002
0002
0002
0002
0003
0003
0002
0002
0005
0005
p (from T)
p (from T)
q (from S)
q (from S)
Student: 500 pages, 80 tuples/page, 50 bytes/tuple
Take: 1000 pages, 100 tuples/page, 40 bytes/tuple
- 200 courses in table Take
- 1, 2, …, 40 in attribute Age
of table Student
For each tuple r in page p
For each tuple s in page q,
If r.sid = s.sid then
output the tuple joined from
tuple r and tuple s
剩余29页未读,继续阅读
资源评论
wxg520cxl
- 粉丝: 23
- 资源: 3万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功