Question

In: Computer Science

QUERY PROCESSING JOIN 1) Let the schema of a relation r as R(A,B,C), and a relation...

QUERY PROCESSING JOIN

1) Let the schema of a relation r as R(A,B,C), and a relation s has schema S(C,D,E). Relation table r has 40K tuples, relation s has 60K tuples. The block factor of r is 25. The block factor of s is 30. Let the average seek time is t S and average block transfer time is t T . Assume you have a memory that contains M pages, but M< 40K/25 (indicating that s cannot be entirely loaded to the main memory). Assume there is no index. Estimate the worst-case costs of the following query r s using each of the following join strategies:

• Nested Loop Join

• Block Nested Loop Join

• Merge join

• Hash join

Solutions

Expert Solution

Hope it helps, Please upvote if you are happy with the answer


Related Solutions

Let the schema R = (A,B,C) and the set F = {A → B,C → B}...
Let the schema R = (A,B,C) and the set F = {A → B,C → B} of FDs be given. Is R in 3NF? Why or why not?
Let R be the relation on Z+× Z+ such that (a, b) R (c, d) if...
Let R be the relation on Z+× Z+ such that (a, b) R (c, d) if and only if ad=bc. (a) Show that R is an equivalence relation. (b) What is the equivalence class of (1,2)? List out at least five elements of the equivalence class. (c) Give an interpretation of the equivalence classes for R. [Here, an interpretation is a description of the equivalence classes that is more meaningful than a mere repetition of the definition of R. Hint:...
Consider the natural join of the relation R(A,B) and S(A,C) on attribute A. Neither relations have...
Consider the natural join of the relation R(A,B) and S(A,C) on attribute A. Neither relations have any indexes built on them. Assume that R and S have 80,000 and 20,000 blocks, respectively. The cost of a join is the number of its block I/Os accesses. If the algorithms need to sort the relations, they must use two-pass multi-way merge sort. QUESTION: Assume that there are 10 blocks available in the main memory. What is the fastest join algorithm for computing...
Let A and B be sets, and let R be a relation from A to B....
Let A and B be sets, and let R be a relation from A to B. Prove that Rng(R^-1) = Dom(R)
Let R be the relation on Q defined by a/b R c/d iff ad=bc. Show that...
Let R be the relation on Q defined by a/b R c/d iff ad=bc. Show that R is an equivalence relation. Describe the elements of the equivalence class of 2/3.
Let A = R x R, and let a relation S be defined as: “(x​1,​ y​1)​...
Let A = R x R, and let a relation S be defined as: “(x​1,​ y​1)​ S (x​2,​ y​2)​ ⬄ points (x​1,​ y​1)​ and (x​2,​ y​2)​are 5 units apart.” Determine whether S is reflexive, symmetric, or transitive. If the answer is “yes,” give a justification (full proof is not needed); if the answer is “no” you ​must​ give a counterexample.
For the relation R(A,B,C,D,E) with the following Functional Dependencies: A → B, A → C, BC...
For the relation R(A,B,C,D,E) with the following Functional Dependencies: A → B, A → C, BC → D, AC → E, CE → A, list all non-trivial FDs following from the above.    Generate all possible keys for R. Check whether R is in 3NF. If it is in 3NF, explain the criteria you used. If it is not in 3NF, convert it into 3NF, showing the new relations and their FDs.
Let R=R+. Define: a+b = ab ; a*b = a^(lnb) 1. Is (R+, +, *) a...
Let R=R+. Define: a+b = ab ; a*b = a^(lnb) 1. Is (R+, +, *) a ring? 2. If so is it commutative? 3. Does it have an identity?
Q1. a. Given a schema R (A, B, C, D, E, F) and a set F...
Q1. a. Given a schema R (A, B, C, D, E, F) and a set F of functional dependencies {A → B, A → D, CD → E, CD → F, C → F, C → E, BD → E}, find the closure of the set of functional dependencies ?+ b. Given a schema R = CSJDPQV and a set FDs of functional dependencies FDs = {C → CSJDPQV, SD → P, JP → C, J → S} 1. Find...
Let x be a set and let R be a relation on x such x is...
Let x be a set and let R be a relation on x such x is simultaneously reflexive, symmetric, and antisymmetric. Prove equivalence relation.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT