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

  Create a card class that models a single playing card

Create a 'Card" class that models a single playing card.

  What are some additional things and relationships

What are some additional things and relationships among things

  Sql queries using mysql

Query1 Write a SQL statement to display the course numbers of classes taught by Hammett Glenn. Query2 Write a SQL statement to display the course names of the courses taught by an instructor whose id is 415. Query3 Write a query to display the name ..

  Characterize a page fault rate using pure demand paging

Consider system which uses pure demand paging: When a process first start execution, how would you characterize a page fault rate?

  Give a detail explanation of what vlans are

Give a detail explanation of what VLANs are.

  Explain purpose or benefits of it steering committee

Explain the purpose of an IT steering committee, and identify the benefits of the committee.

  Suppose a c++ compiler for the mips

Suppose a C++ compiler for the MIPS machine associates $s5 with array a and $s6 with variable i. How does it translate a[i] = a[i+1]; into MIPS assembly language?

  Write pseudocode for an iterative algorithm

Write pseudocode for an iterative algorithm that determines a DFS spanning tree for an undirected graph. Base your algorithm on the traversal algorithm dfs.

  When accessing the remote linux machine

When accessing the remote Linux machine

  How computer technology has been changing

Which of the subsequent statements about how computer technology has been changing over the last few decades is/are true?

  Compare b-mac, z-mac and s-mac for wireless sensor networks

Compare B-MAC, Z-MAC and S-MAC for wireless sensor networks.

  What do you mean by the word query processing write down

question 1 what do you mean by the term query processing? what are its objectives?question 2 what are the typical

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