Database SQL

User Generated

XNENA27

Computer Science

Description

ALL attached in document

Unformatted Attachment Preview

2. (10/10 points) Assume that you have just built a dense B+ tree containing100,000 records, with one record per disk sector. The key field is a 20 byte string. Pointers (i.e. record ids) are 4 byte values. The size of one disk sector is 4096 bytes. Nodes at each level are filled up as much as possible. A node corresponds to a disk sector. a. How many key/pointer pairs fit within a B+ node? b. How many levels does the resulting tree have? c. How many leaf nodes are used by the tree? d. How many total nodes (root + internal + leaf) are required for the index? 3. (20/15 points) A file with Part# as the hash key incudes records with the following Part# values: 2368, 3760, 4692, 4871, 5659, 1821, 1074, 7115, 1620, 2428, 3943, 4750, 6975, 4981 and 9208. A bucket is one disk sector and holds four records and appropriate pointer values. Load these records into the file in the given order, using linear hashing. Start with one bucket using the hash function hn = K mod 2n. You only need to show the final result. 4. (20/20 points) Consider the activity https://s2.smu.edu/~fmoore/misc/activity_2017-08-30.pdf Using the same structure, show the detailed node structure of the B+ tree created based upon Hmwk2, page 1
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Attached.

#!/bin/sh
#Create By Chrisclan17
##First we'll need to install tree. This will enable us to view the folder
structure. The tree command enables one to recursively view a directory
### listing or structure
yum -y install tree
##
###### Directories subdirectories creation
##Create parent directory or install directory
##we'll began creating the directories and subdirectories using the mkdir
command for each directory name.
##The main directories are apache and www which are the parent directories
indicated by +-. The subdirectories for apache are bin, conf, and lib. The
subdirectories ##for www are html, cgi-bin and ftp.
INSTALL_DIRECTORY='/home'
#we will ensure that we are starting in our individual Home directory:
cd ~
#We will then need to Print all files and folders in current Working Directory
with their respective permissions
ls -la
slash='/'
#Here we will be creating apache and www as the parent directory followed by
their respective sub directories
apacheDir='apache'
apacheDir=$INSTALL_DIRECTORY$slash$apacheDir
#Creating path for www
wwwDir='www'
wwwDir=$INSTALL_DIRECTORY$slash$wwwDir
#echo $apache
if [ ! -d "$apacheDir" ]; then
mkdir "$apacheDir"
fi
if [ ! -d "$wwwDir" ]; then
mkdir "$wwwDir"
fi
bin='bin'
bin=$apacheDir$slash$bin
conf='conf'
conf=$apacheDir$slash$conf
lib='lib'
lib=$apacheDir$slash$lib

if [ ! -d "$bin" ]; then
mkdir "$bin"
fi
if [ ! -d "$conf" ]; then

mkdir "$conf"
fi
if [ ! -d "$lib" ]; then
mkdir "$lib"
fi
html='html'
html=$wwwDir$slash$html
cgiBin='cgi-bin'
cgiBin=$wwwDir$slash$cgiBin
ftp='ftp'
ftp=$wwwDir$slash$ftp
if [ ! -d "$html" ]; then
mkdir "$html"
fi
if [ ! -d "$cgiBin" ]; then
mkdir "$cgiBin"
fi
if [ ! -d "$ftp" ]; then
mkdir "$ftp"
fi
###########Assigning the respective permissions###########
#Assigning of Read,Write and Execute Permissions to User
chmod u=rwx $apacheDir
chmod u=rwx $html
chmod u=rwx $cgiBin
chmod ...


Anonymous
Excellent! Definitely coming back for more study materials.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags