This section of the User Guide will take you through the steps of creating/randomly generating your own B-Tree to practising questions on that B-Tree.
When entering the Custom Tree Creation Menu you will be greeted with the following page. From here you will have all the tools you need to create your custom/randomly generated B-Tree.
To navigate back to the main menu select the Back button located on the top left of the screen. The light bulb on the top left of the screen will switch the application in and out of dark mode.
The arrow and centre(.) buttons will move the B-Tree around within the canvas and the centre button will move it to the centre of the canvas.
To get help with using the software, select the “Need Help” button and the following pop up will appear where you can view a quick guide to the software.
To create a custom B-Tree you will use the tools in the figure below. In order to create a new B-Tree you will need to select the “Max Degree” input box and insert a numerical value between 2 and 4. Once entering the value, select the “Custom Tree” button.
After selecting the “Custom Tree” button, the canvas should allow you to insert/delete keys as seen in the figure below.
To insert keys, select the “Insert” input box and insert a numerical value and then click the “Insert” button. Once completed, you will see a key pop up in the canvas and this can be seen in the left image. After continually inserting values, you will eventually have a B-Tree that looks as you desire, this B-Tree will be restructured automatically and requires no user input to change it.
If you made a mistake or you would like to remove a key, you can use the delete feature. To delete keys, select the “Delete” input box and insert a numerical value (that already exists within the B-Tree) and then click the “Delete” button. Once completed, you will see the desired key removed from the B-Tree. The deletion from the B-Tree will cause it to be restructured automatically and requires no user input to change it. For example, removing 22 from the B-Tree above:
To create a randomly generated B-Tree you will use the tools in the figure below. In order to create a new randomly generated B-Tree you will need to select the “Max Degree” input box and insert a numerical value between 2 and 4. You will need to select the “Num Keys” input box and insert a numerical value between 1 and 100.
To use a seed to generate your random B-Tree, you will need to select the “Seed” input box and insert a numerical and select the “Use Seed” Checkbox. Essentially all this does is create a B-Tree using a particular seed.
Once entering the values described above, select the “Random Tree'' button. After selecting the “Random Tree” button, the canvas should allow you to insert/delete keys as seen in the figure below and it will create a randomly generated B-Tree on the canvas. After generating the random B-Tree you can use the insert and delete key functionality to further customise your randomly generated B-Tree.
To insert keys, select the “Insert” input box and insert a numerical value and then click the “Insert” button. Once completed, you will see your key inserted into the B-Tree, the B-Tree will be restructured automatically and requires no user input to change it.
To delete keys, select the “Delete” input box and insert a numerical value that already exists in the B-Tree and then click the “Insert” button. Once completed, you will see your key removed from the B-Tree, the B-Tree will be restructured automatically and requires no user input to change it.
To save and load a B-Tree, you will need to use the buttons displayed below.
To save a B-Tree that you have created, you will need to select the “Save” button. After saving the B-Tree, it will automatically download a text file to your device containing the contents used to create the B-Tree.
To load a B-Tree you will need to select the “Load” button. After selecting the button, a pop up to your field will be displayed. From here, you can select the text file of the B-Tree you would like to load. After selectin the file and opening it, the B-Tree will be created within the canvas area.
After creating/generating your custom B-Tree, you can then answer questions on it. To do this, select the “Generate Questions on Tree” button.
After selecting this button you will be greeted with the following screen. As soon as the screen loads, you will be prompted with a question to perform on the B-Tree. You can use sections 3 and 4 in the user guide to help you complete these operations.
Once you have completed the operation, select the “Check Answer” button. From here, one of two things may happen.
The first option is that the operation you performed may be incorrect. In this case you will be notified and you will have the chance to see the correct answer by selecting the “Show Correct Answer”.
The second option is that the operation you performed may be correct. In this case you will be notified and then a new question will be generated and the tree will be reset back to the original one created by you.
Note how a new question was created, from here you can perform the new question. If you get stuck during a question and would like to retry it, you can select the retry button situated at the top left of the screen.
You can navigate back the custom tree creation by selecting the back button. You can also access the help menu by selecting the button as seen below.
To create a custom B-Tree you will use the tools in the figure below. In order to create a new B-Tree you will need to select the “Max Degree” input box and insert a numerical value between 2 and 4. Once entering the value, select the “Custom Tree” button.
After selecting the “Custom Tree” button, the canvas should allow you to insert/delete keys as seen in the figure below.
To insert keys, select the “Insert” input box and insert a numerical value and then click the “Insert” button. Once completed, you will see a key pop up in the canvas and this can be seen in the left image. After continually inserting values, you will eventually have a B-Tree that looks as you desire, this B-Tree will be restructured automatically and requires no user input to change it.
If you made a mistake or you would like to remove a key, you can use the delete feature. To delete keys, select the “Delete” input box and insert a numerical value (that already exists within the B-Tree) and then click the “Delete” button. Once completed, you will see the desired key removed from the B-Tree. The deletion from the B-Tree will cause it to be restructured automatically and requires no user input to change it. For example, removing 22 from the B-Tree above:
To create a randomly generated B-Tree you will use the tools in the figure below. In order to create a new randomly generated B-Tree you will need to select the “Max Degree” input box and insert a numerical value between 2 and 4. You will need to select the “Num Keys” input box and insert a numerical value between 1 and 100.
To use a seed to generate your random B-Tree, you will need to select the “Seed” input box and insert a numerical and select the “Use Seed” Checkbox. Essentially all this does is create a B-Tree using a particular seed.
Once entering the values described above, select the “Random Tree'' button. After selecting the “Random Tree” button, the canvas should allow you to insert/delete keys as seen in the figure below and it will create a randomly generated B-Tree on the canvas. After generating the random B-Tree you can use the insert and delete key functionality to further customise your randomly generated B-Tree.
To insert keys, select the “Insert” input box and insert a numerical value and then click the “Insert” button. Once completed, you will see your key inserted into the B-Tree, the B-Tree will be restructured automatically and requires no user input to change it.
To delete keys, select the “Delete” input box and insert a numerical value that already exists in the B-Tree and then click the “Delete” button. Once completed, you will see your key removed from the B-Tree, the B-Tree will be restructured automatically and requires no user input to change it.
To save and load a B-Tree, you will need to use the buttons displayed below.
To save a B-Tree that you have created, you will need to select the “Save” button. After saving the B-Tree, it will automatically download a text file to your device containing the contents used to create the B-Tree.
To load a B-Tree you will need to select the “Load” button. After selecting the button, a pop up to your field will be displayed. From here, you can select the text file of the B-Tree you would like to load. After selectin the file and opening it, the B-Tree will be created within the canvas area.
After creating/generating your custom B-Tree, you can then answer questions on it. To do this, select the “Generate Questions on Tree” button.
After selecting this button you will be greeted with the following screen. As soon as the screen loads, you will be prompted with a question to perform on the B-Tree. You can use sections 3 and 4 in the user guide to help you complete these operations.
Once you have completed the operation, select the “Check Answer” button. From here, one of two things may happen.
The first option is that the operation you performed may be incorrect. In this case you will be notified and you will have the chance to see the correct answer by selecting the “Show Correct Answer”.
The second option is that the operation you performed may be correct. In this case you will be notified and then a new question will be generated and the tree will be reset back to the original one created by you.
Note how a new question was created, from here you can perform the new question. If you get stuck during a question and would like to retry it, you can select the retry button situated at the top left of the screen.
You can navigate back the custom tree creation by selecting the back button. You can also access the help menu by selecting the button as seen below.
When entering the Answer Random Questions menu you will be greeted with the following page. As soon as the screen loads, you will be prompted with a question to perform on a random B-Tree. You can use sections 3 and 4 in the user guide to help you complete these operations.
Once you have completed the operation, select the “Check Answer” button. From here, one of two things may happen.
The first option is that the operation you performed may be incorrect. In this case you will be notified and you will have the chance to see the correct answer by selecting the “Show Correct Answer”.
The second option is that the operation you performed is correct. In this case you will be notified and then a new question will be generated with a new random tree.
Note how a new question was created, from here you can perform the new question. If you get stuck during a question and would like to retry it, you can select the retry button situated at the top left of the screen.
You can navigate back the custom tree creation by selecting the back button. You can also access the help menu by selecting the button as seen below.
The tree manipulation guide is an introduction into how to manipulate the B-tree to achieve the desired answer. Every possible way to manipulate the B-Tree is listed below.
To move a key, follow these steps:
To insert a key into a node, follow the instructions in 1.1 for selecting and moving a key. When positioning the key within the node, observe the colour change from light blue to green, signifying the key's correct placement. There are three key attachment positions within a node:
To remove a key from a node, follow these steps:
To delete a key from the tree, follow these steps:
Left-clicking and dragging moves individual keys, however, there may be situations where we would like to move an entire node instead of just moving individual keys.
To move an entire node, follow these steps:
To create a link between a child node and the tree, follow these detailed steps:
There may be cases where a connection between a parent node and child node already exists, however, you would like to overwrite this already established connection to make a new connection between the parent node and a new child node.
To overwrite a child node, follow these steps:
There may be cases where you need to split the root node of the tree so that the median key of the original root becomes the single key of the new root and the keys contained in the left half of the original root become the new roots’ left child and the keys contained in the right half of the original root become the new roots’ right node.
Please note that functionality of splitting the node will only be available to the user if the root node has the maximum amount of keys i.e., (2t-1) keys.
To split the root node, follow these steps:
To move a key, follow these steps:
To insert a key into a node, follow the instructions in 1.1 for selecting and moving a key. When positioning the key within the node, observe the colour change from light blue to green, signifying the key's correct placement. There are three key attachment positions within a node:
To remove a key from a node, follow these steps:
To delete a key from the tree, follow these steps:
Left-clicking and dragging moves individual keys, however, there may be situations where we would like to move an entire node instead of just moving individual keys.
To move an entire node, follow these steps:
To create a link between a child node and the tree, follow these detailed steps:
There may be cases where a connection between a parent node and child node already exists, however, you would like to overwrite this already established connection to make a new connection between the parent node and a new child node.
To overwrite a child node, follow these steps:
There may be cases where you need to split the root node of the tree so that the median key of the original root becomes the single key of the new root and the keys contained in the left half of the original root become the new roots’ left child and the keys contained in the right half of the original root become the new roots’ right node.
Please note that functionality of splitting the node will only be available to the user if the root node has the maximum amount of keys i.e., (2t-1) keys.
To split the root node, follow these steps:
Before we delve into B-tree insertions with preemptive splitting, let's ensure we have a solid understanding of what a B-tree is. A B-tree is a self-balancing search tree data structure that maintains sorted data and enables efficient insertion, deletion, and search operations. It's widely used in database systems and file systems because of its balanced structure and efficient performance characteristics.
A B-tree of degree t is defined by the following properties:
Before we delve into B-tree insertions with preemptive splitting, let's ensure we have a solid understanding of what a B-tree is. A B-tree is a self-balancing search tree data structure that maintains sorted data and enables efficient insertion, deletion, and search operations. It's widely used in database systems and file systems because of its balanced structure and efficient performance characteristics.
A B-tree of degree t is defined by the following properties:
Before we delve into B-tree insertions with preemptive splitting, let's ensure we have a solid understanding of what a B-tree is. A B-tree is a self-balancing search tree data structure that maintains sorted data and enables efficient insertion, deletion, and search operations. It's widely used in database systems and file systems because of its balanced structure and efficient performance characteristics.
A B-tree of degree t is defined by the following properties:
Before we delve into B-tree insertions with preemptive splitting, let's ensure we have a solid understanding of what a B-tree is. A B-tree is a self-balancing search tree data structure that maintains sorted data and enables efficient insertion, deletion, and search operations. It's widely used in database systems and file systems because of its balanced structure and efficient performance characteristics.
A B-tree of degree t is defined by the following properties: