Skip to content

WckdAwe/Python-BPlusTree

Repository files navigation

Contributors All Contributors Forks Stargazers Issues MIT License


Python-BPlusTree

A simple and functional B+ Tree illustration & Visualization using
Python & GraphViz

Table of Contents

About The Project

This B+ Tree implementation was created as part of an assignment for the University subject Databases II on the 5th Semester of [CS Dept., University of Thessaly][CSUTH].

It is free to use under MIT license and anyone wanting to can experiment and improve upon our implementation.

You can read more about B+ Trees here.

Built with

Getting Started

After making sure you have installed any and all dependencies, you can verify that our implementation is working by executing the following command:

python bplustree.py

If you are planning to also Visualize the tree, give it a quick test by typing:

python bplustree_with_visualizer.py

And that's it!

Usage

Without Visualization/Graphviz

  1. Import BPlusTree from bplustree.
  2. Initialize BPlusTree
    bplustree = BPlusTree(order=5)
    
  3. Insert/Delete by calling bplustree.insert(key, value) or bplustree.delete(key) accordingly, example:
    bplustree.insert(2, 'Bravo')
    bplustree.insert(13, 'November')
    bplustree.delete(2)
    
  4. Call bplustree.show_bfs() to print the tree's in console.
  5. Call bplustree.show_all_data() to print all data stored in the Leafs of the B+ Tree.

With Visualization

  1. Import GraphableBPlusTree from bplustree.
  2. You can use all the methods from above.
  3. Call bplustree.view_graph() to generate a .png containing the B+ Tree.

Contributing ✨

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Thanks goes to these wonderful people who contribute✨:

Life is not accumulation, it is about contribution. - Stephen Covey

I guess this ain't life. - WckdAwe

Authors

  • Dimitriadis Vasileios (WckdAwe) -- ( Website | Github )
  • Kouskouras Taxiarchis (TheNotoriousCS) -- ( Github )

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Disclaimer

All the information on this repository is provided in good faith, however we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability or completeness of any information - see the DISCLAIMER.md file for more details.

Security

For security related issues please read SECURITY.md.

Acknowledgements

Hats off to any person whom contributed to this Project, formally or informally. This couldn't be possible without the assistance of these people.

We have borrowed a-freaking-lot of ideas & code from the above guys to make our stuff kinda work. Make sure to check their individual projects out! ❤️

About

Python B+ Tree basic implementation and Visualization

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages