Question

In: Computer Science

Consider the Happy Cruise Lines Sailor file shown below. It lists all of the sailors on...

Consider the Happy Cruise Lines Sailor file shown below. It lists all of the sailors on the company’s cruise ships by their unique sailor identification number, their name, the unique identification number of the ship they currently work on, their home country, and their job title.

Sailor

Number

Sailor

Name

Ship

Number

Home

Country

Job

Title

1

00536

John Smith

009

USA

Purser

2

00732

Ling Chang

012

China

Engineer

3

06988

Maria Gonzalez

020

Mexico

Purser

4

16490

Prashant Kumar

005

India

Navigator

5

18535

Alan Jones

009

UK

Cruise Director

6

20254

Jane Adams

012

USA

Captain

7

23981

Rene Lopez

020

Philippines

Captain

8

27467

Fred Jones

020

UK

Waiter

9

27941

Alain DuMont

009

France

Captain

10

28184

Susan Moore

009

Canada

Wine Steward

11

31775

James Collins

012

USA

Waiter

12

32856

Sarah McLachlan

012

Ireland

Cabin Steward

                 Sailor file

QUESTION: Construct a B+-tree index of the type shown in this chapter for the Sailor file, assuming that now there are many more records than are shown above. The file and the index have the following characteristics:

  • The file is stored on nine cylinders of the disk. The highest key values on the nine cylinders, in order, are:

                        Cylinder 1: 02653

                        Cylinder 2: 07784

                        Cylinder 3: 13957

                        Cylinder 4: 18002

                        Cylinder 5: 22529

                        Cylinder 6: 27486

                        Cylinder 7: 35800

                        Cylinder 8: 41633

                        Cylinder 9: 48374

  • Each index record can hold four key value/pointer pairs.

  • There are three index records at the lowest level of the tree index.

Solutions

Expert Solution

Given : To draw B+ Tree for given Sailor file.

Introduction to B+ Tree:

  • The B+ tree is a balanced binary search tree. It follows a multi-level index format.
  • In the B+ tree, leaf nodes denote actual data pointers. B+ tree ensures that all leaf nodes remain at the same height.
  • In the B+ tree, the leaf nodes are linked using a link list. Therefore, a B+ tree can support random access as well as sequential access.

Structure of B+ Tree

  • In the B+ tree, every leaf node is at equal distance from the root node. The B+ tree is of the order n where n is fixed for every B+ tree.
  • It contains an internal node and leaf node.   

Diagram o B+ Tree:

This is final B+ Tree for Sailor file.And we can also Insert ,delete the tree at beginning , ending and at specific postion when we need to modify the data of particular tree.


Related Solutions

INTRO TO DATABASE Consider the Sailors-Boats-Reserves database described below. Sailors(sid: integer, sname: string, rating: integer, age:...
INTRO TO DATABASE Consider the Sailors-Boats-Reserves database described below. Sailors(sid: integer, sname: string, rating: integer, age: real) Boats(bid: integer, bname: string, color: string) Reserves(sid: integer, bid: integer, day: date) Write each of the following queries in SQL. 1. Find the names and ages of sailors who have reserved at least two boats. 2. For each boat reserved by at least 2 distinct sailors, find the boat id and the average age of sailors who reserved it.
We have these 3 lines in an excel file. The goal is to set all the...
We have these 3 lines in an excel file. The goal is to set all the lines like the second one ( 26/07/2019) 24-Apr-2019 26/07/2019 03/03/2017 16:29
Use the Main.java file below to read in phrases (entire lines!) and print underscores "_" for...
Use the Main.java file below to read in phrases (entire lines!) and print underscores "_" for each character. Main.java already imports the Scanner class, creates your Scanner object, and reads in the first phrase from the keyboard. Your task is as followed: import java.util.Scanner; public class Main {    public static void main(String[] args) {        Scanner keyboard = new Scanner(System.in);        String phrase = keyboard.nextLine();           //Your code here!    } } Write a nested...
Consider the system of capacitors shown in the figure below
Consider the system of capacitors shown in the figure below (C1 = 4.00 μF,C2 = 2.00 μF). (a) Find the equivalent capacitance of the system.  (b) Find the charge on each capacitor.  (c) Find the potential difference across each capacitor (d) Find the total energy stored by the group.
The table below lists the observed frequencies for all four categories for an experiment.
The table below lists the observed frequencies for all four categories for an experiment. __________________________ Category 1 2 3 4 ___________________________ Observed Frequency 12 14 18 16 _____________________________ The null hypothesis for the goodness-of-fit test is that the proportion of all elements of the population that belong to each of the four categories is the same. What is the expected frequency for the second category? The null hypothesis for the goodness-of-fit test is that the proportion of all elements of...
PROBLEM: Write a C program that will produce the EXACT output shown below. Using initialization lists,...
PROBLEM: Write a C program that will produce the EXACT output shown below. Using initialization lists, create 5 one-dimensional arrays, one for each of these: hold the names of the people running in the election (see note below) hold the names of the subdivision (see note below) hold the vote counts in the Aberdeen subdivision for each candidate hold the vote counts in the Brock subdivision for each candidate hold the vote counts in the Sahali subdivision for each candidate...
Done in C++, Write a program to read the input file, shown below and write out...
Done in C++, Write a program to read the input file, shown below and write out the output file shown below. Use only string objects and string functions to process the data. Do not use c-string functions or stringstream (or istringstream or ostringstream) class objects for your solution. Input File Cincinnati 27, Buffalo 24 Detroit 31, Cleveland 17 Kansas City 24, Oakland 7 Carolina 35, Minnesota 10 Pittsburgh 19, NY Jets 6 Philadelphia 31, Tampa Bay 20 Green Bay 19,...
Consider the dataset shown below where the decision attribute is restaurant
Consider the dataset shown below where the decision attribute is restaurantShown below is a partially developed decision tree. Finish creating the tree using the ID3 method. YOU WILL NOT RECEIVE ANY CREDIT UNLESS YOU SHOW ALL OF YOUR WORK IN TERMS OF ENTROPY AND INFORMATION GAIN CALCULATIONS!!!
Consider the cost of assigning a task to an individual as shown in the table below....
Consider the cost of assigning a task to an individual as shown in the table below. It is assumed that each individual can be assigned to at most one task, and each task can be assigned to at most one individual. The objective is to minimize the cost of assignments. individual Task 1 2 3 1 17 18 16 2 14 19 17 3 15 19 18 (a) Write down the linear programming formulation of this problem. (i.e., write down...
Consider the system of capacitors shown in the figure below (C1 = 7.00
Consider the system of capacitors shown in the figure below (C1 = 7.00
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT