Skip to content

This project simulates a database management system using a B+ Tree to efficiently store and manage data. It demonstrates key database concepts such as table management, indexing, and basic tree operations like insertion, searching, and deletion. The B+ Tree structure enables fast data access, making it ideal for indexing in databases.

License

Notifications You must be signed in to change notification settings

Shabnam-Khaqanpoor/Database-Simulator-Using-B-plus-Tree

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Database Simulator

Overview 🌟

This project simulates a database system using a B+ Tree 🌳 to store and manage data efficiently. The B+ Tree provides fast access to the data through tree-based searching, making it ideal for implementing indexing mechanisms in a database. This project demonstrates key database concepts such as table management, indexing, and tree operations like insertion, searching, and deletion.

Key Concepts πŸ”‘

  1. B+ Tree 🌳
    The B+ Tree is a balanced tree structure where each node can store multiple keys, and leaf nodes contain the actual data or pointers to data. This structure enables fast searching, insertion, and deletion operations.

    • Insertion βž•: Adds new records to the database while maintaining the tree’s balance.
    • Search πŸ”: Finds a record in the database by navigating through the tree.
    • Deletion ❌: Removes records from the database and adjusts the tree structure to maintain balance.
  2. Database Table πŸ“‘
    The project includes a simulation of a database table, which manages records and their associated indexes. This section is designed to handle various data types and supports adding, updating, and deleting records.

    • Record Management πŸ“‹: Supports the insertion, deletion, and modification of records.
    • Index Management πŸ—‚οΈ: Keeps track of records using the B+ Tree and helps in fast lookups.
  3. Indexing πŸ”’
    The project supports the creation of different types of indexes:

    • Primary Index πŸ”‘: A unique index that ensures each record has a unique key.
    • Unique Index βœ…: Ensures no duplicate values for a given column.
    • Non-Unique Index πŸ”„: Allows multiple records with the same value in the indexed column.

Features βš™οΈ

  • B+ Tree Operations 🌳: Insertion, deletion, and search.
  • Table Management πŸ—ƒοΈ: Record and index management within a database table.
  • Index Creation 🏷️: Support for primary, unique, and non-unique indexes for fast access.
  • Data Types πŸ’Ύ: Handling of different data types in the database.

Usage πŸ› οΈ

  1. Setting Up the Database πŸ—οΈ
    The database is initialized by creating tables and indexes. You can insert records and define primary or secondary indexes to improve data access.

  2. Inserting Records βž•
    Records can be inserted into the database using the B+ Tree structure. Insertions will maintain the tree balance automatically.

  3. Searching Records πŸ”
    To retrieve records, the project supports searching by key value. The B+ Tree structure ensures that searches are performed in logarithmic time, providing fast access to the desired records.

  4. Deleting Records ❌
    Records can be deleted from the database, with the system handling the necessary tree rebalancing and index adjustments.

  5. Creating Indexes 🏷️
    Users can create indexes for columns in a table, choosing between primary, unique, and non-unique types to optimize query performance.

Conclusion 🎯

This project offers a simulation of a database management system using a B+ Tree, which is essential for understanding the basics of database indexing and tree-based data structures. It demonstrates the implementation of common tree operations and their application to database record management.

About

This project simulates a database management system using a B+ Tree to efficiently store and manage data. It demonstrates key database concepts such as table management, indexing, and basic tree operations like insertion, searching, and deletion. The B+ Tree structure enables fast data access, making it ideal for indexing in databases.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published