Could Someone help me with this theory question ??????

From: afi <alan.jfitzpatrick_at_gmail-dot-com.no-spam.invalid>
Date: Fri, 04 Nov 2005 02:10:00 -0600
Message-ID: <vuKdnTQHTNnFivbeRVn_vQ_at_giganews.com>



Can some one please help me with this b+ tree problem as i have just started database and need help to answer these questions thanks very much in advance I really need help now

Storage Problem

A company maintains the following information :

On customers



Cust Id (4 byte integer)
CustName (var length avg 18 bytes)
CustAddress (var length avg 60 bytes)
AcctBal (4 byte integer)

On sales



OrderId (4 byte integer)
CustId (foreign key to customer record) DateOfSale (4 byte integer)
ProductId (4 byte integer)
Cost (4 byte integer)

Each primary file or index file has a single header record padded out to be 8192 bytes in size. Each record in the primary file contains 8 bytes of additional information for control purposes. File data is read or written in blocks 8192 bytes in size. B-Tree nodes are also this size. Assume an average fill factor in B-Trees nodes of 50%. Due to fragmentation at the file system level blocks that are adjacent in files may not be adjacent on disk. The cost to read a block from disk is on average 5 ms.

The company has 260,00 customers and 10,000,000 sales records. Assume only 10% of sales cost more than 100 euro and that on average 100,000 sales occur every month.

For each of these two primary files



Give the average size of a single record Give the number of records per 8k block Give the total size of each primary file
Give both order and depth (specifying number of levels of index nodes) in the following indexes. HINT: use the number of records in the index to calculate the required depth:
B+Tree on customer file using custid field as index key 
B+Tree on customer file using name as index key 
B+Tree on sales file using custid field as index key 
B+Tree on sales file using cost field as index key :oops:  :oops: 
:oops: :oops: :oops: Received on Fri Nov 04 2005 - 09:10:00 CET

Original text of this message