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

  Describes how your interface implements the principles

Also, prepare a written summary that describes how your interface implements the principles of good interface design as presented in the textbook.

  Program to print the input provided by the user

Write down a program whose main function is merely a collection of the variable declarations and the function calls.

  Change asynchronous-clear to a synchronous-clear circuit

Change the asynchronous-clear circuit to a synchronous-clear circuit in the register of Figure. The modified register will have a parallel-load capability and a synchronous-clear capability.

  Distinguish between open and closed applications.

explain  HTML, XML and Java programming. What is the difference between the three.

  Determining the total price of an order by program

You have been asked to develop a program in order to determine the total price of an order from an Office Supply store. Program shall prompt user for name of the product, price of the product, and quantity of the order.

  Query using an update statement

Here is issue, a table namedPoints varchar(81) has values stored in a column named Point. There are two columns in the Points table, X and Y.

  Question 1a explain the following biometric techniques- i

question 1a explain the following biometric techniques- i retina scan ii fingerprint scan iii iris scan. your answer

  Describe how a computer and information systems manager

describe how a computer and information systems manager could effectively manage in a virtual environment based on

  Which entities are dependent and which are independent

Create a data model. Include entities, attributes, identifiers, and relationships. Which entities are dependent? Which are independent? Use the steps of normalization to put your data model in 3NF. Describe how you know that it is in 3NF.

  Pros and cons of application software in business

Operating system software for your personal PC: define What are the differences among Windows OSs

  What changes arc needed in figure to convert

What changes arc needed in Fig. to convert it to a serial subtractor that subtracts the content of register B from the content of register A?

  Explain what is the purpose of the business impact analysis

What is the purpose of the business impact analysis (BIA)? What is the difference between a disaster recovery plan (DRP) and a business continuity plan (BCP)?

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