How to write this C program for B-trees??? (URGENT)
Posted on 2001-06-21
My brother needs to solve this problem until the end of this day, so please give it a quick look and let me know if you can solve it. Send the solution later in the day. I WILL AWARD 800 points to the person that will give me a working solution.
The problem has to do with implementing b-trees (I don't know what this is), and implementing them in C. The problem goes like this:
Target of this exercise is to create a primary index (B+-tree) on a file.
The program should ask the user for a physical name of a file, that will have the following contents:
It will ask the user for the class of the primary index (up to 8) and the max. number of keys on the terminals (up to 12). Then, it will create a secondary index for the field named nationality (this will also be a B+-tree) for which it will ask again for the class, from the user.
Then the following actions should be programmed:
1. Entering a record
2. Deleting a record
3. Questioning using primary key
4. Questioning using the secondary key (by giving a value find the records, OR by giving a range of values, find the records belonging to it).
This exercise should run on SUN and it is preferred that the gcc compiler is used. I do not need fancy graphics, etc, just a file that works...
Thanks for trying. Just let me know first whether you can do it, and send the solution later, taking your time (I need it by afternoon, 5pm UK time).