Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Q4. Suppose we have the following relations: R(A,B,C) and S(D,E,F).
Assume that R uses 500 blocks on disk, and S uses 6,000 blocks. Assume that you got the best possible hash
function and there are no overflows for the hash. Assuming that there are 102 blocks of memory space for query
processing, what is the least cost (in terms of disk block IOs) for partition hash join for the query R JOINC=D S?
Expert Solution
arrow_forward
Step 1
The answer is given below::--
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Similar questions
- Please do both questions. Thank you in advance. Subject- Security Governance Type 1: Calculation of hash values for given keys –In this type of questions, hash values are computed by applying given hash function on given keys. Que – 1. Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true? i. 9679, 1989, 4199 hash to the same valueii. 1471, 6171 has to the same valueiii. All elements hash to the same valueiv. Each element hashes to a different value(A) i only(B) ii only(C) i and ii only(D) iii or iv Type 2: Insertion of keys into hash table using linear probing as collision resolution technique –In linear probing technique, collision is resolved by searching linearly in the hash table until an empty location is found. Que – 2. The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and…arrow_forwardConsider the query:select *from r, swhere upper(r.A) = upper(s.A);where “upper” is a function that returns its input argument with all lowercaseletters replaced by the corresponding uppercase letters. Some database systems would use a (block) nested-loop join for this query, which can be very inefficient. Briefly explain how hash-join or merge-join can be used for this query.arrow_forwardPlease answer all parts of the question, thanksarrow_forward
- Using quadratic probing, what would be the answer for the following questions if you insert the following keys in sequence: 10, 17, 24, 31, 21, 19. (N = 7) While doing the insertions keep track of the number of collisions for each key and get the final configuration of the structure. Use the following quadratic hashing function: ((x mod 7) + j²) mod 7. What is the final configuration of the hash table? Use the indices from 0 to 6 to report where each key will be mapped. If the position has no value use the word empty. For example, if the final configuration is 10,17,24,31,21,19 (starting from index 0), your answer in the box should be 10,17,24,31,21,19,empty. Please don't use blank spaces or quotes to separate the values. Report the number of collisions for each key using the order of insertion. For example, if you answer as 0,1,3,1,0,1, this means that you found 0 collisions for key 3, 1 collision for key 10, 3 collisions for key 17, 1 collision for key 24, 0 collisions…arrow_forwardChoose one method of collision resolution and briefly explain how it works. Since collisions are due to hashing, make sure you mention the role hashing plays in collisions. Be specific about what hashing is and what its role is.arrow_forwardSuppose that we are using extendable hashing on a file that contains records with the following search-key values:2, 3, 5, 7, 11, 17, 19, 23, 29, 31Showthe extendable hash structure for this file if the hash function is h(x) = x mod 8 and buckets can hold three records.arrow_forward
- Hash functionJohn, Bob, and David want to store their valuable data into storage that has 245 memory locations. Their T-numbers are 3488, 5605, and 9088, respectively. Using a hash function, identify their memory locations. Do you see any collision in this example?arrow_forwardGiven a sequence of 5 keys < 53, 66, 32, 41, 88 > for searching task: a) Given the hash function H(k) = (3.k) mod 7, insert the keys above according to its original order (from left to right) into a hash table of 7 slots. Indicate the cases of collision. Clearly show the steps and calculation with a table. b) In case of any collisions found above in a) part, determine the new slot for each collided case using Linear Probing to solve the collision problem. Clearly show your answer for each identified case. No step of calculation required. o (Answer with “NO collision found”, in case there is no collisions found above) c) In case of any collisions found above in a) part, determine the new slot ONLY for the first collided case using Double-Hashing (with functions below) to solve the collision problem. Clearly show the steps of your calculation. d1 = H(k) = (3.k) mod 7 di = (di−1 + ((5·k) mod 6) + 1) mod 7 , i ≥ 2 o (Answer with “NO collision found”, in case there is no collisions…arrow_forwardInsert the following sequence of keys in the hash table.Keys = {4, 2, 1, 3, 5, 6, 8}Use linear probing technique for collision resolution: h(k, i) = [h(k) + i] mod mHash function, h(k) = 3k + 1Table size, M = 10 Draw the hash table, compute the index where the hashvalue will be inserted for each key, and show how you would use the technique when a collisionoccurs.arrow_forward
- 3. (A) Show the result when putting the keys 19,12,14,13,9 into a hash table of size 7, usingHashing with Linear Probing. The hash function is hash(k) = k mod 7. Don’t resize.(B) Continuing from part A, show the result after deleting 19.arrow_forwardYou are employed by the NSA (National Security Agency) and you have received the following message that contains the following text: “George Smiley arrived in Prague on Friday evening at 10:50 PM. ……” See TTS.txt A quick analysis of text can be achieved by storing each word in a hash table. After storing all words in a hash table you will then be able to print all the words stored in each row of the hash table. Requirements: Create a hash key value (int Key) and init to a prime value (13) Create an array of string pointers S_ptr[13] Each string pointer, S_ptr[i], should allocate on the heap an array of strings (size 35) Initialize all row elements of hash table with ‘#’ Read the text, one word a time, and compute its hash index value (int Hash(string Word) The Hash function should take the numerical sum of all the characters in the Word and calculate (Sum%Key )which is then output to the program as an Index. Recognize that output Index can…arrow_forwardSuppose you have a closed hash table with 500 slots, and there are currently 400 records in the hash table. Approximately how many memory accesses, on average, would you expect upon inserting the next record into the table, assuming a "good" (near optimal) hash function and probe function? (Answer with a single number, rounded to the nearest integer.)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY