# Question A.Consider the bank database of Figure 15.14, where the primary keys are underlined, and the following SQL query: select T.branch name from branch T, branch S where T.assets > S.assets and S.branch city = “Brooklyn” Write an efficient relational-algebra expression that is equivalent to this query. Justify your choice. B. Let relations r1(A, B, C) and r2(C, D, E) have the following properties: r1 has 20,000 tuples, r2 has 45,000 tuples, 25 tuples of r1 fit on one block, and 30 tuples of r2 fit on one block. Estimate the number of block transfers and seeks required using each of the following join strategies for r1 ⋈ r2: a. Nested-loop join. b. Block nested-loop join. c. Merge join. d. Hash join. 0S4U1K The Asker · Computer Science
A.Consider the bank database of Figure 15.14, where the primary keys are underlined, and the following SQL query: select T.branch name from branch T, branch S where T.assets > S.assets and S.branch city = “Brooklyn” Write an efficient relational-algebra expression that is equivalent to this query. Justify your choice. B. Let relations r1(A, B, C) and r2(C, D, E) have the following properties: r1 has 20,000 tuples, r2 has 45,000 tuples, 25 tuples of r1 fit on one block, and 30 tuples of r2 fit on one block. Estimate the number of block transfers and seeks required using each of the following join strategies for r1 ⋈ r2: a. Nested-loop join. b. Block nested-loop join.  c. Merge join. d. Hash join.
Transcribed Image Text: A.Consider the bank database of Figure 15.14, where the primary keys are underlined, and the following SQL query: select T.branch name from branch T, branch S where T.assets > S.assets and S.branch city = “Brooklyn” Write an efficient relational-algebra expression that is equivalent to this query. Justify your choice. B. Let relations r1(A, B, C) and r2(C, D, E) have the following properties: r1 has 20,000 tuples, r2 has 45,000 tuples, 25 tuples of r1 fit on one block, and 30 tuples of r2 fit on one block. Estimate the number of block transfers and seeks required using each of the following join strategies for r1 ⋈ r2: a. Nested-loop join. b. Block nested-loop join. c. Merge join. d. Hash join.
More
Transcribed Image Text: A.Consider the bank database of Figure 15.14, where the primary keys are underlined, and the following SQL query: select T.branch name from branch T, branch S where T.assets > S.assets and S.branch city = “Brooklyn” Write an efficient relational-algebra expression that is equivalent to this query. Justify your choice. B. Let relations r1(A, B, C) and r2(C, D, E) have the following properties: r1 has 20,000 tuples, r2 has 45,000 tuples, 25 tuples of r1 fit on one block, and 30 tuples of r2 fit on one block. Estimate the number of block transfers and seeks required using each of the following join strategies for r1 ⋈ r2: a. Nested-loop join. b. Block nested-loop join. c. Merge join. d. Hash join.