Deriving formulas for input/output

I'm currently enrolled in a DBS class and am having problem with an assignment. I've searched around and have been unable to understand what it is I'm meant to be doing with this derivation formula.

A plant file with TREE-GENUS as the key field includes records with the following TREE-GENUS values: Tsuga, Ficus , Arbutus, Quercus, Melaleuca, Tristaniopsis, Cornus, Sequoiadendron, Lithocarpus, Liriodendron, Pittosporum.
Suppose that records with these search field values are inserted into a random (heap) file with a maximum of 3 records per block. Derive a formula for the expected number of disk I/O to scan these records and to search for a particular record

I've been using some software that was given with the assignment and it also asks what are the maximum number of blocks that are allowed and that is not given by the above brief. I'm not really sure how to derive a formula for this. I've assumed that because there are 3 records per block there are 4 blocks required and that a random heap file uses 1 disk i/o per write/read.

If this is a larger topic than is worth explaining a link to a reliable few pages is also helpful.

Answers

This is obviously a homework question but it seems to me a bit like a trick question from a db perspective. I don't think there is a simple answer and here the answer may be quite a number of additional questions. My recommendation in trying to answer the question is to sketch out how pages would work, and the like. In essence so much depends on implementation (compare disk I/O in MySQL's InnoDB vs PostgreSQL and you will see massive differences due partly to supported methods of access).

The key problem comes down to indexing. The heap table could in fact be implicitly indexed the way MySQL's InnoDB does, or it could be unindexed (the way PostgreSQL does it). If it is indexed, then you have additional issues. Do you support a physical scan of the first block (to determine where to start)? If so, how do you determine which starting point to use (if you collect statistics on the data in the tables that would help but that's additional I/O there too)?

I could imagine cases where the number of disk block reads could range from n/3 (where n is the number of records) to (n^1/10)/3, and writes to range from 1 to n/3.

In the end questions like this, particularly where you have software assigned for use in class probably should be directed to your instructor. It isn't clear what the point of the exercise is and so much depends on implementation.

Related Articles

I'm currently enrolled in a DBS class and am having problem with an assignment. I've searched around and have been unable to understand what it is I'm meant to be doing with this derivation formula. A plant file with TREE-GENUS as the key field inclu

I tried to search for a topic on this, but didn't seem to find anything, so here goes. I'm pretty new to Mathematica, so there are a lot of things I don't know yet, but one thing is pretty annoying so far. If I type something, lets say 10 lines with

I have a problem with a file at a ext3 partition on CentOS 5 server (kernel version 2.6.18-164.15.1.el5) with a HP Raid Controller: hpacucli ctrl all show detail Smart Array P410 in Slot 1 Bus Interface: PCI ... HP tool doesn't report any problems. I

We need to monitor the download/upload bandwidth on interfaces on Huawei S5300 switches, and we need to do it with a specific monitoring system. This system can get information from a switch using SNMP OID and can draw historic graphs based on collec

I'm writing a real-time operating system for microcontrollers in C++11 - distortos. Currently I'm thinking about a C++ framework for various peripherals. The most basic peripheral which I would like to have there are input/output pins. Because such i

I've used dd to clone hard drives before using 'dd' and a live cd, but have run into a problem. The issue: dd fails with an "Input/Output Error" on /dev/sda3 , even though windows "check disk" (chkdsk) says it's ok. Context: Trying to

I began trying to backup my dvd collection to an external hard drive. I do this my making disk images(.iso) from the dvds. To do this I use disk utility > new image > save as dvd/cd master. Started with some Battlestar Galactica. First 6 disks of se

I began trying to backup my dvd collection to an external hard drive. I do this my making disk images(.iso) from the dvds. To do this I use disk utility > new image > save as dvd/cd master. Started with some Battlestar Galactica. First 6 disks of se

I keep getting the following error my Linux machine. Input/output error It occurs when I try to us commands like df or change to certain directories on the drive. Could this be caused by a hard drive failure? --------------Solutions------------- Yes,

I wish to know what could be the possible cases for this error: cp: reading `filename': Input/output error I am getting this message when I am trying to copy a big file of around 50MB. --------------Solutions------------- The most likely problem is a

I'm trying to set a backup to tape of a machine using flexbackup. However any attempt to write to the tape drive (via either flexbackup or just tar) results in "/dev/st0: Input/output error" The machine seems to recognise the drive (HP Storagewo

a couple of other people have posted about this but my specific problem has not been addressed. For months I have been backing up DVDs and home movies with no problem then all of a sudden I get an "input/output" error. Yes I have cleaned the dis

I'm trying to use LVMs on multiple machines at once without the use of CLVM. My reason for doing so is that I've found CLVM rather unstable and a pain to get working in the flexible way in which I want it. Given that I know which servers will be conn

When I run the lvdisplay, it showed the following error... /usr/sbin/lvdisplay /dev/sdb: read failed after 0 of 2048 at 0: Input/output error /dev/sdb1: read failed after 0 of 2048 at 0: Input/output error /dev/sdb2: read failed after 0 of 2048 at 0:

at the moment my laptop does not have any os i am trying to install ubuntu 10.04 but after the initial installation steps it shows an "input/output error during read on /dev/sda" and the installation stops i have no idea what to do? any help wou

I have two RHEL5 boxes on a private network together (192.168.2.0/24) and I am trying to export a file system from one to the other but I keep getting the following error: mount.nfs: Input/output error on the client side I see this output: mount: try

I have a mac that is hooked into a sound board, I have external sound card that interfaces between the computer and the soundboard, this works great. However, whenever the computer restarts it sets the input & output to the 'internal microphone' and

Been trying to install ubuntu on my Samsung NB30 netbook, but I have been running into the same error over and over again. [Errno 5] Input/output error This particular error is often due to a faulty CD/DVD disk or drive, or a faulty hard disk. It may

I have an issue with one of our servers running Ubuntu 10.04, it is running BackupPC and collects backups from various machines / servers around the building. On the 8th minute (12:08, 12:18, 12:28 etc) the backups are transferred to an external hard