Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)
正在生成预览...
Tài liệu giới thiệu về xử lý truy vấn trong hệ cơ sở dữ liệu quan hệ, bao gồm SQL, đại số quan hệ, các kế hoạch truy vấn và tối ưu hóa truy vấn.
描述
Data-Intensive Computing Systems Introduction to Query Processing Shivnath Babu Query Processing Declarative SQL Query → Query Plan NOTE: You will not be tested on how well you know SQL. Understanding the SQL introduced in class will be sufficient (a primer follows). SQL is described in Chapter 6, GMUW. Focus: Relational System (i.e., data is organized as tables, or relations) SQL Primer We will focus on SPJ, or Select-Project-Join Queries Select <attribute list> From <relation list> Where <condition list> Example Filter Query over R(A,B,C): Select B From R Where R.A = “c” R.C > 10 SQL Primer (contd.) We will focus on SPJ, or Select-Project-Join-Queries Select <attribute list> From <relation list> Where <condition list> Example Join Query over R(A,B,C) and S(C,D,E): Select B, D From R, S Where R.A = “c” S.E = 2 R.C = S.C R A B C S C D E a 1 10 10 x 2 b 1 20 20 y 2 c 2 10 30 z 2 d 2 35 40 x 1 e 3 45 50 y 3 Select B,D From R,S Answer Where R.A = “c” S.E = 2 R.C=S.C B 2 D x How do we execute this query? Select B,D From R,S Where R.A = “c” S.E = 2 R.C=S.C One idea Do Cartesian product Select tuples Do projection RXS Select B,D R.A R.B R.C S.C S.D S.E a 1 10 10 x 2 a . . 1 10 20 y 2 c . . 2 10 10 x 2 From R,S Where R.A = “c” S.E = 2 R.C=S.C Bingo! Got one... Relational Algebra - can be used to describe plans Ex: Plan I B,D sR.A=“c” S.E=2 R.C=S.C X R S Relational Algebra Primer (Chapter 5, GMUW) Select: sR.A=“c” R.C=10 Project: B,D Cartesian Product: R X S Natural Join: R S Relational Algebra - can be used to describe plans Ex: Plan I B,D sR.A=“c” S.E=2 R.C=S.C X R S OR: B,D [ sR.A=“c” S.E=2 R.C = S.C (RXS)] Another idea: Plan II B,D sR.A = “c” Select B,D R(A,B,C) From R,S Where R.A = “c” S.E = 2 R.C=S.C sS.E = 2 S(C,D,E) natural join R S A B C s (R) s(S) C D E a 1 10 A B C C D E 10 x 2 b 1 20 c 2 10 10 x 2 20 y 2
AI 摘要
- 文档名称
- Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)
- 学校 / 课程
- Duke University · Cơ sở dữ liệu
- 内容
- Tài liệu này giải thích quá trình xử lý truy vấn SQL trong hệ thống cơ sở dữ liệu quan hệ, từ việc chuyển đổi truy vấn thành kế hoạch thực thi, các kỹ thuật tối ưu hóa, đến quy trình tổng thể của xử lý truy vấn.
- 目录
- Introduction to Query Processing
- Query Processing
- SQL Primer
- Relational Algebra Primer
- Overview of Query Processing
- Example Query
- Example: Parse Tree
- Along with Parsing …
- SQL query
- Initial Logical Plan
- Apply Rewrite Rule (1)
- Apply Rewrite Rule (2)
- Apply Rewrite Rule (3)
- 页数
- 49 页
- 上传者
- Uni24h
常见问题
此文档免费吗?
是的。“Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)”是免费的 — 只需登录并点击“下载”即可获取原始文件。
这份文档有多少页?
该文档共有 49 页,适用于课程 Cơ sở dữ liệu。您可以在下载前进行在线预览。
我可以在下载前预览吗?
是的。您可以通过在线阅读器直接在本页面预览此文档,然后再决定是否下载。
Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)
正在生成预览...
Data-Intensive Computing Systems Introduction to Query Processing Shivnath Babu Query Processing Declarative SQL Query → Query Plan NOTE: You will not be tested on how well you know SQL. Understanding the SQL introduced in class will be sufficient (a primer follows). SQL is described in Chapter 6, GMUW. Focus: Relational System (i.e., data is organized as tables, or relations) SQL Primer We will focus on SPJ, or Select-Project-Join Queries Select <attribute list> From <relation list> Where <condition list> Example Filter Query over R(A,B,C): Select B From R Where R.A = “c” R.C > 10 SQL Primer (contd.) We will focus on SPJ, or Select-Project-Join-Queries Select <attribute list> From <relation list> Where <condition list> Example Join Query over R(A,B,C) and S(C,D,E): Select B, D From R, S Where R.A = “c” S.E = 2 R.C = S.C R A B C S C D E a 1 10 10 x 2 b 1 20 20 y 2 c 2 10 30 z 2 d 2 35 40 x 1 e 3 45 50 y 3 Select B,D From R,S Answer Where R.A = “c” S.E = 2 R.C=S.C B 2 D x How do we execute this query? Select B,D From R,S Where R.A = “c” S.E = 2 R.C=S.C One idea Do Cartesian product Select tuples Do projection RXS Select B,D R.A R.B R.C S.C S.D S.E a 1 10 10 x 2 a . . 1 10 20 y 2 c . . 2 10 10 x 2 From R,S Where R.A = “c” S.E = 2 R.C=S.C Bingo! Got one... Relational Algebra - can be used to describe plans Ex: Plan I B,D sR.A=“c” S.E=2 R.C=S.C X R S Relational Algebra Primer (Chapter 5, GMUW) Select: sR.A=“c” R.C=10 Project: B,D Cartesian Product: R X S Natural Join: R S Relational Algebra - can be used to describe plans Ex: Plan I B,D sR.A=“c” S.E=2 R.C=S.C X R S OR: B,D [ sR.A=“c” S.E=2 R.C = S.C (RXS)] Another idea: Plan II B,D sR.A = “c” Select B,D R(A,B,C) From R,S Where R.A = “c” S.E = 2 R.C=S.C sS.E = 2 S(C,D,E) natural join R S A B C s (R) s(S) C D E a 1 10 A B C C D E 10 x 2 b 1 20 c 2 10 10 x 2 20 y 2
阅读全文
- 文档名称
- Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)
- 学校 / 课程
- Duke University · Cơ sở dữ liệu
- 内容
- Tài liệu này giải thích quá trình xử lý truy vấn SQL trong hệ thống cơ sở dữ liệu quan hệ, từ việc chuyển đổi truy vấn thành kế hoạch thực thi, các kỹ thuật tối ưu hóa, đến quy trình tổng thể của xử lý truy vấn.
- 目录
- Introduction to Query Processing
- Query Processing
- SQL Primer
- Relational Algebra Primer
- Overview of Query Processing
- Example Query
- Example: Parse Tree
- Along with Parsing …
- SQL query
- Initial Logical Plan
- Apply Rewrite Rule (1)
- Apply Rewrite Rule (2)
- Apply Rewrite Rule (3)
- 页数
- 49 页
- 上传者
- Uni24h
评论 (0)
暂无评论。快来抢沙发吧!
Thiết kế quản trị Cơ sở dữ liệu - Notes 2 (HUST) GV. Vũ Tuyết Trinh
Thiết kế quản trị Cơ sở dữ liệu - Notes 11 (HUST) GV. Vũ Tuyết Trinh
Thiết kế quản trị Cơ sở dữ liệu - Notes 12 (HUST) GV. Vũ Tuyết Trinh
Thiết kế quản trị Cơ sở dữ liệu - Notes 1 (HUST) GV. Vũ Tuyết Trinh
Thiết kế quản trị Cơ sở dữ liệu - Notes 3 (HUST) GV. Vũ Tuyết Trinh
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 5.Thuyết tương đối - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 4. Tán xạ ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 3.Phân cực ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
评论 (0)
暂无评论。快来抢沙发吧!