Cash-back offer from April 23rd to 27th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question Details Normal
$ 35.00

1 - A file has r=20,000 STUDENT records of fixed-length

Question posted by
Online Tutor Profile
request

1 - A file has r=20,000 STUDENT records of fixed-length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), ADDRESS (40 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes), SEX (1 byte), MAJORDEPTCODE (4 bytes), MINORDEPTCODE (4 bytes), CLASSCODE (4 bytes, integer), and DEGREEPROGRAM (3 bytes). An additional byte is used as a deletion marker.
Consider B=512
a.Calculate the record size R in bytes.
b.Calculate the blocking factor bfr and the number of file blocks b assuming an unspanned organization.
c.Calculate the average time it takes to find a record by doing a linear search on the file if (i) the file blocks are stored contiguously and double buffering is used, and (ii) the file blocks are not stored contiguously.
d.    Assume the file is ordered by SSN; calculate the time it takes to search for a record given its SSN value by doing a binary search.
 
2 - A PARTS file with Part# as hash key includes records with the following Part# values: 2369, 3760, 4692, 4871, 5659, 1821, 1074, 7115, 1620, 2428, 3943, 4750, 6975, 4981, 9208. The file uses 8 buckets, numbered 0 to 7. Each bucket is one disk block and holds two records. Load these records into the file in the given order using the hash function h(K)=K mod 8. Calculate the average number of block accesses for a random retrieval on Part#.

3 - Suppose that a file initially contains r=120,000 records of R=200 bytes each in an unsorted (heap) file. The block size B=2400 bytes, the average seek time s=16 ms, the average rotational latency rd=8.3 ms and the block transfer time btt=0.8 ms. Assume that 1 record is deleted for every 2 records added until the total number of active records is 240,000.
a.How many block transfers are needed to reorganize the file?
b.How long does it take to find a record right before reorganization?
c.How long does it take to find a record right after reorganization?


4 - A PARTS file with Part# as key field includes records with the following Part# values: 23, 65, 37, 60, 46, 92, 48, 71, 56, 59, 18, 21, 10, 74, 78, 15, 16, 20, 24, 28, 39, 43, 47, 50, 69, 75, 8, 49, 33, 38. Suppose the search field values are inserted in the given order in a B + -tree of order p=4 and p leaf =3; show how the tree will expand and what the final tree looks like.

5 - Develop cost functions for the PROJECT, UNION, INTERSECTION, SET DIFFERENCE, and CARTESIAN PRODUCT algorithms discussed in section 19.4.

6 - Extend the sort-merge join algorithm to implement the LEFT OUTER JOIN operation.

Available Answers
$ 35.00

[Solved] Complete Solution (6/6) Scored 100%

  • This Solution has been Purchased 3 time
  • Submitted On 19 Jan, 2015 06:51:33
Answer posted by
Online Tutor Profile
solution

Answer

R   = Record fileds size  + deletion marker size
     = 30 + 9 + 40 + 9 + 8 + 1 + 4 + 4 + 4 + 3 + 1
     = 113 bytes

b.    Calculate the blocking factor bfr and the number of file blocks b assuming an unspanned organization.
Answer
i)
Blocking factor bfr = floor(B / R)
           = floor( 512 /113)
   &nbs...

Buy now to view the complete solution
Other Related Questions

No related question exists

The benefits of buying study notes from CourseMerits

Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton
Only 45 characters allowed.
closebutton

$ 629.35