Main advantage b-trees

Assignment Help Basic Computer Science
Reference no: EM13762521

1. Give brief and clear answers to the following:

(a) Explain the main advantage B-trees have over a multilevel index of the type.

(b) Since indexes speed up searches, why wouldn't the DBMS automatically create an index for every column of a table?

(c) A file of 16000 blocks is to be sorted with an available buffer space of 16 blocks. How many passes will be needed in the merge phase of the external sort-merge algorithm ?
2.  (a) Suppose the relation R has an attribute A with the following 17 records:

34, 5, 24, 32, 25, 28, 3, 26, 31, 18, 32, 14, 13, 19, 3, 2, 7 Show how the sort-merge external sorting algorithm will sort these values, by showing
i. what the initial sorted runs will look like.
ii. what the runs will look like after each merge pass
iii. what the final sorted file will look like (split into blocks).

Please note that you do not have to show any further calculations, just show what the file blocks look like for each of the above.

You can assume that each block can store 2 records, and that the number of buffer blocks available is nB = 3

(b) Suppose the operation is EMP LOY EE ./SSN=ESSN W ORKSON, and we are using J1, the nested-loop join approach. Further suppose that the buffer size nB = 8, the EMP LOY EE file has 8000 records in 1000 blocks, and the W ORKSON file has 2000
records in 500 blocks. Calculate the number of disk accesses if

i. EMP LOY EE is the outer relation.
ii. W ORKSON is the outer relation.

(c) There are two relations R(A,B) and S(B,C), and the operation is R ./B=B S, and we are using J2, the single-loop join approach. The R file has 2000 records in 100 blocks. The S file has 100 records in 10 blocks. Assume the relationship between R and S is 1-1 and partial-total i.e. for every R tuple, there is at most one S tuple, and for every S tuple, there is exactly one R tuple. For R, there is a secondary index on the field B. For S, there is a secondary index on the field B. The index levels are χR = 7, χS = 3. Calculate the number of disk accesses if

i. R is the outer relation and we use J2.
ii. S is the outer relation and we use J2.

3. (35 points) For each of these queries based on the Elmasri company database, do the following

i Show the initial query tree which is a direct translation of the given relational algebra expression. Please note that your tree should be similar to the tree in Figure 19.4 (a), and not the canonical tree in Figure 19.4 (b).
ii Show the final, more efficient query tree you will get after you have applied the different transformations. Please note that you just have to show the final tree and not the intermediate steps i.e. you only have to show a final tree similar to Elmasri , and not the intermediate trees like (c), (d). You should try and get the most efficient tree you can.

(a) Get the names of the dependents of female employees. The initial relational algebra expression is: πDependentName(σEMP LOY EE.Sex=‘F0(EMP LOY EE ./SSN=ESSN DEP ENDENT)).

(b) Find the last names of employees whose salary is less than 40,000 and who work on a projects controlled by the Marketing department. The initial relational algebra expression is: πLName(σSalary<40,000(σDname=‘Marketing0( (EMP LOY EE ./SSN=ESSN W ORKSON) ./P no=P number (P ROJECT ./Dnum=Dnumber DEP ARTMENT) ))).

Reference no: EM13762521

Questions Cloud

Describe a key conflict in the play : Describe a key conflict in the play and how it corresponds to a character's development. Describe two key literary techniques and elements and techniques of drama that aid in developing the conflict.
Short paper on firewalls and intrusion detection system : Both firewalls and intrusion detection systems are used to monitor network traffic and implement network security policies. Research these technologies and determine how they are similar and how they differ. Are both needed? Explain your answer in..
Research the elements of business : Using your current work organization (or an organization of interest) as the subject matter, research the elements of business, and prepare an APA-formatted paper that does the following:
The health data evidence : Find health data (national, state and local) related to a population in your community.
Main advantage b-trees : Explain the main advantage B-trees have over a multilevel index of the type.
Describe the hardware you will purchase or build : Describe the hardware you will purchase or build (inclusive of computers, memory, storage, video cards, printers, routers and cabling). Justify your hardware selection.
Explain what literary concept you found most confusing : Explain what literary concept, definition, technique or conflict you found most confusing. What did you do to try to understand that subject?
Prepare the case budget for the fourth quarter : Using a spreadsheet to prepare the case budget for the fourth quarter. The cash budget should be included as an appendix to the written report and should be referenced in the written report.
Problem related to nutrition : Body mass index (BMI) and use this to evaluate her weight status using the information.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How you would overcome these challenges

You are the CIO for Rapid Cargo, a shipping company specializing in delivering large items quickly - Show the issues that managing and implementing the technology architecture you would have and how you would overcome these challenges.

  Approach appropriate for company forefront of technology

However, adopting a secondary approach where others adopt early and a firm learns from their mistakes is often a viable strategy. When is each approach most appropriate and why?

  Find the type of language of the below languages

Find the type of language of the below languages L1 = {0^i1^j|i!=j}; L2 = {0^i1^j|i=j},L3={0^i1^j|i=2j+1},L4={0^i1^j|i!=2j}

  Explain why your technique is lossless and not lossy

Devise a way to compress the following list of last names using a lossless technique. Describe your method and show the compressed list. Explain why your technique is lossless and not lossy.

  Create a monospaced font of point size

How would you create a Monospaced font of point size 20 that is bold? Give the Java statement needed.

  Give upper bound on number of training

Give an upper bound on the number of training examples sufficient to assure with 90% confidence that the learned perceptron will have true error of at most 5%. Does this bound seem realistic?

  List the number (count) of unreserved room

List the guests by guest number, last name, first name and the number of times each guest has stayed in one of our hotels (include all reservations, past, current and future). Arrange the list in order from most-frequent stayer (greatest number of st..

  Which following statements correctly sets a dog weigh

Assume you have created a class named Dog that contains a data fi eld named weight and an instance method named setWeight(). Further assume the setWeight() method is public and accepts a numeric parameter named pounds

  Local broadcasts cable-satellite

Personal Video Recorders (PVRs): Personal video recorders (PVRs) are digital video recorders used to record and replay television programs received from cable, satellite, or local broadcasts. However, unlike VCRs, which PVRs replaced, PVRs offer m..

  What would the data dictionary

what would the data dictionary look like for question 5a pg. 88

  Distinguish distances that moved their shopping carts

Performing 200 Nm of work. Both Brian and Dawn are exerting same amount of force (20 N). Distinguish the distances that Brian and Dawn moved their shopping carts.

  How linear program the problem of finding the maximum profit

Formulate as a linear program the problem of finding the maximum profit weekly production mix. Solve the linear program from Part A using the Simplex method.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd