Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)
Génération de l'aperçu...
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.
Description
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
Résumé IA
- Nom du document
- Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)
- École / Cours
- Duke University · Cơ sở dữ liệu
- Contenu
- 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.
- Table des matières
- 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)
- Pages
- 49 pages
- Téléversé par
- Uni24h
Foire aux questions
Ce document est-il gratuit ?
Oui. « Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh) » est gratuit — il suffit de vous connecter et de cliquer sur Télécharger pour obtenir le fichier original.
Combien de pages compte ce document ?
Le document contient 49 pages, pour le cours Cơ sở dữ liệu. Vous pouvez le prévisualiser en ligne avant de le télécharger.
Puis-je prévisualiser avant de télécharger ?
Oui. Vous pouvez prévisualiser ce document directement sur cette page avec le lecteur en ligne, puis décider de le télécharger ou non.
Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)
Génération de l'aperçu...
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
Lire le document entier
- Nom du document
- Query Processing (16) (Xử lý truy vấn trong hệ CSDL quan hệ) (Tiếng Anh)
- École / Cours
- Duke University · Cơ sở dữ liệu
- Contenu
- 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.
- Table des matières
- 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)
- Pages
- 49 pages
- Téléversé par
- Uni24h
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !
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
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !