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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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