Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relational schema and SQL query: (A) Trace the System R dynamic programming algorithm on this query. (B) Give a relational algebra tree

Consider the following relational schema and SQL query:

image text in transcribed

(A) Trace the System R dynamic programming algorithm on this query.

(B) Give a relational algebra tree that is reasonably efficient (Hint: think of algebraic equivalences)

Consider the following relational schema and SQL query: Employee(eid: integer, did: integer, sal: real, hobby: char(20)) Department(did: integer, dname : char(20), floor: integer, phone: char(10)) Finance(did: integer, budget: real, sales: real, expenses: real) SELECT D.dname, F.budget FROM Employee E, Department D, Finance F WHERE E.did-D.did AND D.did-F.did AND D.floor 1 AND E.sal >= 59000 AND E.hobby = 'golf' Suppose we have the following indexes: Bt indexes exist on the attributes Employee.did, Employee.sal, Dept.floor, Department.did, and Finance.did. The DBMS has only the index nested loops and sort-merge as join algorithms Consider the following relational schema and SQL query: Employee(eid: integer, did: integer, sal: real, hobby: char(20)) Department(did: integer, dname : char(20), floor: integer, phone: char(10)) Finance(did: integer, budget: real, sales: real, expenses: real) SELECT D.dname, F.budget FROM Employee E, Department D, Finance F WHERE E.did-D.did AND D.did-F.did AND D.floor 1 AND E.sal >= 59000 AND E.hobby = 'golf' Suppose we have the following indexes: Bt indexes exist on the attributes Employee.did, Employee.sal, Dept.floor, Department.did, and Finance.did. The DBMS has only the index nested loops and sort-merge as join algorithms

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

More Books

Students also viewed these Databases questions

Question

6. What questions would you suggest should be included?

Answered: 1 week ago