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
… Tải file gốc để đọc toàn bộ tài liệu.
- 文档名称
- 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)
- Doc.pages
- 49 页
- 上传者
- Giang Le
常见问题
Tài liệu này có miễn phí không?
Có. “Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)” miễn phí — bạn chỉ cần đăng nhập rồi bấm Tải xuống để lấy file gốc.
Tài liệu dài bao nhiêu trang?
Tài liệu gồm 49 trang, thuộc môn Cơ sở dữ liệu. Bạn có thể xem trước online trước khi tải.
Tôi có thể xem trước trước khi tải không?
Có. Bạn xem trước tài liệu ngay trên trang này bằng trình đọc online, rồi quyết định tải về.

评论 (0)
暂无评论。快来抢沙发吧!