File based database implementation in java
Objective
You are to implement a simple database using a sorted file of fixed length records. The data that you are to use for testing is in file: Parks.csv Windows compatible (cr lf). This data contains the visitation records for the US National Parks from 1904 to 2016.. The goal of this assignment is to understand and practice using file management techniques to implement a database system. Your file-based database needs to handle overflow by writing records to an overflow file that contains unsorted records.
First, create a file of fixed length records from the data provided interleaved with blank records. Your file should create space for insertions by writing one blank record between each real record. Meta-information should be stored in a non-fixed length way in a separate configuration file, e.g., “Parks.config”. The config file must also store useful data like the names of the fields (for display), the number of records, and anything else you would want to add.
So, the initial file will have 764 records, half of which are blank. When a record is inserted, the file is searched (using binary search) to find the correct location. If there is a blank record where the new record needs to go, then the blank record is simply overwritten. However, if there is no empty record available in the correct location, the original file should be re-written with new blanks inserted, including after the new record. For example, if we do 3 inserts into blank records, we would now have 385 real records in our file of 764 total records. If the next insert fails, we would create a new file with 770 total records in it (the 385 real records, each with one blank record after it).
You must not read the whole data file into memory at a time
Program Description
Create a program which offers the user the following menu of operations:
1) Create new database
2) Open database
3) Close database
4) Display record
5) Update record
6) Create report
7) Add record
8) Delete record
9) Quit
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.