Skip to content

EXARTeo/BPlusTree_File_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Για την δημιουργία του εκτελέσιμου για το B+ δέντρο, τρέξτε την εντολή make και τρέξτε το εκτελέσιμο:

./build/bplus_main


Οι συναρτήσεις που υλοιποιούν το B+ δέντρο βρίσκονται στην include/btree_implementation.c. Είναι οι:

  • find_next_child_block, που βρίσκει το επόμενο παιδί που πρέπει να προσπελάσουμε, δοθέντος ενός index node και ενός κλειδιού.
  • insert_into_data_node, που εισάγει το record στον data node.
  • handle_data_node_split, που διαχειρίζεται το splitting ενός data node.
  • update_parent_after_split, που ανανεώνει τον γονιό ενός data node που μόλις έγινε split.
  • initialize_index_node, που αρχικοποιεί έναν index node.
  • handle_index_node_split, που διαχειρίζεται το splitting ενός index node (που έχει προκύψει από ένα splitting data node)

Κάθε block μπορεί να αποτελείται είτε από ένα μεγάλο struct index node, που χωράει μέχρι 61 κλειδιά, όπως αναγράφεται στο bp_indexnode.h, είτε από ένα μεγάλο struct data node, που χωράει μέχρι 8 records, όπως αναγράφεται στο bp_datanode.h.

Ενδεικτική εκτέλεση:

$ ./build/bplus_main 
Entry with id=320 already exists
Entry with id=620 already exists
Entry with id=205 already exists
Entry with id=317 already exists
Entry with id=268 already exists
Entry with id=399 already exists
Entry with id=536 already exists
Entry with id=785 already exists
Entry with id=536 already exists
Entry with id=378 already exists
Entry with id=369 already exists
Entry with id=788 already exists
Entry with id=818 already exists
Entry with id=760 already exists
Entry with id=39 already exists
Entry with id=69 already exists
Searching for: 295
(295,Petros,Kostopoulos,Rodos)

About

A robust B+ Tree data structure implementation in C, featuring dynamic node splitting and indexing mechanics, designed for file system and database applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors