Skip to content

Implementation of B+ Tree Index component and disk storage component (concept of memory pools) to store data. Functionality includes single target search, ranged search, and self-balancing tree deletion.

Notifications You must be signed in to change notification settings

bobbyrayyy/CZ4031BPT

Repository files navigation

CZ4031 Project

Introduction

This project is for NTU's CZ4031 module. It is a implementation of a B+ tree index component and a simulated disk storage component to store records from data/data.tsv, which contain information about movies from IMDB.

The project is written in C++.

Compilation and running code

To compile and run the code, you will first need a C++ compiler (e.g. g++).

  1. Download all files from the repo (including data folder)
git pull https://github.com/bobbyrayyy/cz4031BPT
  1. cd to the 'src' directory
cd src
  1. Compile each '.cpp' file.

(MacOS users: I added -std=c++11 flag to solve compilation error.)

g++ -c main.cpp bpt/bplustree.cpp bpt/bplustree_delete.cpp bpt/bplustree_insert.cpp bpt/bplustree_search.cpp storage/disk_storage.cpp
  1. Link main.exe file
g++ -o main.exe bplustree_insert.o bplustree_delete.o bplustree_search.o bplustree.o disk_storage.o main.o

Note that *.o files will all be in current directory (sane level).

  1. Setting block size and paramenter n
  • To run experiment with block size 200B, go to disk_storage.h and uncomment lines 13 and 14, and comment out lines 17 and 18.
  • To run experiment with block size 500B, go to disk_storage.h and comment out lines 13 and 14, and uncomment lines 17 and 18.
  • (Clear instructions in disk_storage.h)
  1. Run main.exe
./main.exe

Experiment results are printed in terminal.

Contributors

  • Bob Lin
  • Gareth
  • Jin Han
  • Kai Feng
  • Louis

References

License

MIT

About

Implementation of B+ Tree Index component and disk storage component (concept of memory pools) to store data. Functionality includes single target search, ranged search, and self-balancing tree deletion.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published