Subject:- Discrete Mathematics.
CSA-CC-125
Topic:-B-Tree
Presented To:-
Dr. Girish Kumar Patel.
Presented BY:-
Vishal Singh.
Y18271026
(MCA : 1st Sem.)
Introduction
• B-Tree is a self-balancing search tree.
• B-Tree was developed in the year of 1972 by Bayer and
McCreight with the name Height Balanced m-way Search Tree.
• Later it was Named as B-Tree.
• They were designed to work well on Direct Access secondary storage
devices (magnetic disks).
• B-trees (and variants like B+ and B* trees ) are widely used in
database systems.
Need
• Unlike self-balancing binary search trees, it is optimized for systems
that read and write large blocks of data.
• It is most commonly used in database and file systems.
• Which is use to store huge size of data.
Algorithm
• Insertion Algorithm
• B-tree requires first traversal in B-tree.
• Through traversal it will find that key to be inserted is
already existing or not.
• If key does not exist in trees then through traversal it
will reach leaf node.
We have two cases for inserting:-
1.Node is not full.
2.Node is already full.
Insertion Algorithm
Example:-Let us take a list of key and create a B-tree.
10,20,50,60,40,80,100
Solution:
1.Insert 10
2.Insert 20
3.Insert 50
4.Insert 60
10
10 20 50
10 20 50 60
10 20
Insertion Algorithm
5.Insert 40
6.Insert 80 7.Insert 100
40
40
10 20
10 20 50 60
50 60 80
40
10 20 50 60 80 10050 60 80 100
Algorithm
• Deletion Algorithm
• Deletion of key also requires first traversal in B-tree.
• After reaching on particular node, two cases may occur:
1.Node is leaf
node.
2.Node is non-
leaf node.
Deletion Algorithm
Delete 40
40
10 20 50 60 80 100
60 80 100
50
10 20
Application
• Huge collection of records into a file structure.
• Any record in it can be searched very efficiently
• Insertion, deletion and modification operations can be carried out
perfectly and efficiently.
Reference
• Data structure using c (Udit Agrawal)
• https://www.researchgate.net/publication/210381551_Analysis_of_B
-tree_data_structure_and_its_usage_in_computer_forensics.
• https://pdfs.semanticscholar.org/presentation/2fd4/2646536d516d4
cb31cf2ade30f95cb3b6d5e.pdf.
B tree

B tree

  • 1.
    Subject:- Discrete Mathematics. CSA-CC-125 Topic:-B-Tree PresentedTo:- Dr. Girish Kumar Patel. Presented BY:- Vishal Singh. Y18271026 (MCA : 1st Sem.)
  • 2.
    Introduction • B-Tree isa self-balancing search tree. • B-Tree was developed in the year of 1972 by Bayer and McCreight with the name Height Balanced m-way Search Tree. • Later it was Named as B-Tree. • They were designed to work well on Direct Access secondary storage devices (magnetic disks). • B-trees (and variants like B+ and B* trees ) are widely used in database systems.
  • 3.
    Need • Unlike self-balancingbinary search trees, it is optimized for systems that read and write large blocks of data. • It is most commonly used in database and file systems. • Which is use to store huge size of data.
  • 4.
    Algorithm • Insertion Algorithm •B-tree requires first traversal in B-tree. • Through traversal it will find that key to be inserted is already existing or not. • If key does not exist in trees then through traversal it will reach leaf node. We have two cases for inserting:- 1.Node is not full. 2.Node is already full.
  • 5.
    Insertion Algorithm Example:-Let ustake a list of key and create a B-tree. 10,20,50,60,40,80,100 Solution: 1.Insert 10 2.Insert 20 3.Insert 50 4.Insert 60 10 10 20 50 10 20 50 60 10 20
  • 6.
    Insertion Algorithm 5.Insert 40 6.Insert80 7.Insert 100 40 40 10 20 10 20 50 60 50 60 80 40 10 20 50 60 80 10050 60 80 100
  • 7.
    Algorithm • Deletion Algorithm •Deletion of key also requires first traversal in B-tree. • After reaching on particular node, two cases may occur: 1.Node is leaf node. 2.Node is non- leaf node.
  • 8.
    Deletion Algorithm Delete 40 40 1020 50 60 80 100 60 80 100 50 10 20
  • 9.
    Application • Huge collectionof records into a file structure. • Any record in it can be searched very efficiently • Insertion, deletion and modification operations can be carried out perfectly and efficiently.
  • 10.
    Reference • Data structureusing c (Udit Agrawal) • https://www.researchgate.net/publication/210381551_Analysis_of_B -tree_data_structure_and_its_usage_in_computer_forensics. • https://pdfs.semanticscholar.org/presentation/2fd4/2646536d516d4 cb31cf2ade30f95cb3b6d5e.pdf.