Hey team! 👋 Welcome to our collaborative space for the CSCI 331 Group Project 3.0. This is where we'll be tackling the challenge of building a sophisticated file structure for zip code data. Let's get this done!
Our main goal is to build a C++ program that creates and manages a blocked sequence set file for zip code records. We're moving beyond simple files and building a persistent, indexed system that can handle additions, deletions, and efficient searches.
- 📁 Blocked Sequence Set: We'll generate a file with fixed-size blocks (default 512 bytes!) to hold our data.
- 🧠 Simple Primary Key Index: We're creating an index file (
{<highest key>, <RBN>}) that gets loaded into RAM for super-fast searches. No loading the whole data file! - 🏎️ Speedy Search Program: A tool that uses our index to find zip codes passed in via command line (like
-256301). It needs to be smart enough to say "Not found!" if a zip isn't there. - ➕ Record Addition: Our program will add new records from a file. This includes handling block splits when a block gets too full!
- ➖ Record Deletion: We'll also delete records by their key. This is the tricky part! We need to manage:
- Block redistribution
- Block merges
- Putting empty blocks on the avail list
- 📊 Two Dump Utilities: We need to create two ways to "see" our file structure:
- Physical Order Dump: Just lists blocks as they appear in the file.
- Logical Order Dump: Follows the predecessor/successor links to show the blocks in key order.
- 📚 Buffer Classes: We'll use a
BlockBuffer(to read from blocks) and aRecordBuffer(to unpack fields) to manage our data flow. - 📜 Awesome Documentation: We've got to document our code extensively with Doxygen and create a
Doxygen PDF. - 📖 User Guide: A clear and simple
user_guide.txtshowing everyone how to use our amazing program.
This special record at the start of our file stores all the metadata:
- File type & version
- Block size (e.g., 512 bytes)
- Min block capacity (e.g., 50%)
- Record and block counts
- Schema info (field names, types, etc.)
- RBN link to the start of the avail-list 👻
- RBN link to the start of the active data list 📦
These are the blocks that hold our actual zip code records.
- Record count (> 0)
- Links to the previous & next active blocks
- A set of records, all sorted by key!
These are blocks that are empty and ready to be reused.
- Record count (must be 0!)
- A link to the next avail block
- (The rest is just empty space)
We've got two big deadlines:
- Preliminary Design Doc 📝
- Preliminary Test Doc 🧪
- The User Guide (
.txt) 📖 - Our length-indicated data files (
.txt) - The simple index file (
.txt) - The Doxygen PDF 📑
- All our
.cppand.hsource code (in a.zipfile) 💻 - The final script file showing our program running
- The final Design Doc 📝
- The final Test Doc 🧪 (this one is HUGE!)
We must show tests for:
- Adding a record (no split)
- Adding a record (that causes a block split)
- Deleting a record (no merge/redistribution)
- Deleting a record (that causes redistribution)
- Deleting a record (that causes a block merge)
Let's do this, team! Let's communicate, split up the work, and build an awesome project. 💪