Find a longest sequence of data entries to insert

Assignment Help Computer Engineering
Reference no: EM131229076

This assignment should be completed individually. Please make sure that your answer is legible (typing is preferred).

Question 1. Consider a Linear Hashing index that uses hi(k) = k mod 2iN as hash functions. In the following snapshot, N = 4, i = 0, and Next = 0. Assume that a bucket split will occur as soon as an insertion is made to a bucket that already contains 4 or more records.


Primary Pages
0 16* 4* 24*  
1 9* 25*    
10 10*      
11 31* 15* 7* 3*

(a) Starting from the given snapshot, find a longest sequence of data entries to insert, so that there is not split of any bucket.

(b) Starting from the given snapshot, find a shortest sequence of data entries to insert, so that each of the four buckets is split exactly once.

Question 2. Given the following instance of the Sailors-Boats-Reserves database, find the answers to the following relational algebra queries.

Sailors

sid

sname

rating

age

22

Dustin

7

45.0

31

Lubber

8

55.5

64

Horatio

7

35.0

85

Art

3

25.5

Boats

bid

bname

color

101

Laker

blue

102

Laker

red

103

Clipper

green

104

Mars

red

Reserves

sid

bid

day

22

101

10/10/08

22

102

10/10/08

31

102

11/10/08

64

101

9/5/08

64

104

11/6/08

(a) Πcolorage>40.0(Sailors) Þa Reserves Þa Boats)
(b) Πbidcolor=red(Boats)) ∩ Πbid(Researves)
(c) (Πsid(Sailors) - Πsidday<10/11/08(Reserves))) Þa Sailors

Question 3. An inventory database has the following schema, in which primary keys of relations are underlined.

Suppliers(sid, sname, address)

Parts(pid, pname, color)

Catalog(sid, pid, price)

The Catalog lists prices of parts for each supplier. Write each of the following queries in SQL, relational algebra, and tuple relational calculus whenever possible.

(a) List the unique name of suppliers who supplied a red or a green part.

(b) List the name and id of suppliers who supplied every red part.

(c) List pairs of suppliers such that they supplied the same part, but the first supplier charges a higher price than the second supplier.

(d) List the pid of parts that are supplied by different suppliers.

Reference no: EM131229076

Questions Cloud

What modes exist in this waveguide : Plot a snapshot of the field patterns a few wavelengths down the waveguide; what modes exist in this waveguide? Repeat for frequencies of 8 GHz and 12 GHz and compare the results.
Description of the selected company operation : Select a company that is currently involved in E-business. Description of the company's operation, The ease of use of the ecommerce site, E- business applications currently used E-commerce marketing strategies, E- commerce Supply chain strategy E- ..
What percentage of the total votes does betsy ross control : How many total votes can be cast? How many votes does Betsy control? What percentage of the total votes does she control? How many directors can Ms. Ramsey and her friends be sure of electing?
Application to one of the major app stores : 1) Research and detail the steps needed in order to publish an application to one of the major App stores. These stores include the Mac App Store, the Windows Store, Google Play, or iOS App Store.
Find a longest sequence of data entries to insert : COMPUTER SCIENCE 5443 - find a longest sequence of data entries to insert, so that there is not split of any bucket and find a shortest sequence of data entries to insert, so that each of the four buckets is split exactly once.
Week leave from her employer to go on religious pilgrimage : Cynthia, an employee, requested a two-week leave from her employer to go on a religious pilgrimage. The pilgrimage was not a requirement of her religion, but Cynthia felt it was a “calling from God.” Will it violate Title VII if Cynthia’s employer do..
Terminate the simulation space outside the free space : Excite this fiber at one end as in the problem above, and plot snapshots of the field pattern a few wavelengths down the fiber.
Write a program in java named prime factorization : Write a program in java named Prime Factorization that begins by reading in a series of positive integers on a single line of input and then computes and prints the product of those integers.
Discuss the disproportionate risk of holding inventory : Discuss the disproportionate risk of holding inventory by retailers ,wholesalers, and manufactures. why has there been a trend to push inventory back up the channel of distribution?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explain differences between the various graphic formats

explain differences between the various graphic formats. express some ways to increase your site's search engine ranking.

  What is the full design for 16 logic microoperations

what is the full design for 16 logic microoperations - Explain in detail.

  Feedback the smartphone gives to you

Write down each interaction between you and your smartphone as a case - Record all the interactions, adding any feedback the smartphone gives to you.

  Questiona company is rewriting its payroll scheme to move

questiona company is rewriting its payroll scheme to move it from old batch-type mainframe to a distributed

  Write a multi-layer neural network in the language

Principles of Neural Systems and Implementation Project Guidelines - Each project requires the development of a program. This means that some programming skills are essential for completing the project successfully.

  Developing a pseudocode and the flowchart

Develop a flowchart and write down the psuedocode for the following: A program which prints every number from 1 through 10. A program which prints every number from 1 through 10 along with its square and cube.

  Consider the reasons implementations fail for at least

1. consider the reasons implementations fail. for at least three of these reasons explain why this happens if there is

  Make use of string class methods to solve the problem

create and develop a program that validates the value a user enters into a TextBox control to ensure that the entry is a valid telephone number. The application should accept a maximum of 12 characters. When the user clicks a button, the program s..

  How to draw a hierarchy chart

How to draw a hierarchy chart

  Compare and contrast telnet and ftp

find out whether or not additional components could be added to the IPv4 protocol to enhance its usefulness.

  Impact on the quality of software available for used

Will commercial software manufacturers be justified in raising their prices to make up for revenue lost to open source competitors? Do you think that strategy will be effective.

  Program has to convert feet into meters

The program must also convert feet into meters. The program prompts the user to enter a number in feet, converts it to meters, and displays the result. One foot is 0.305 meters.

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