Look at index structure selection from the comparison of Hash index, binary tree, B-Tree and B+Tree

Look at index structure selection from the comparison of Hash index, binary tree, B-Tree and B + Tree 1. Hash structure 1.1. About Hash data structure 1.2. Why not choose Hash structure for InnoDB index? 1.3. About InnoDB providing adaptive Hash index (Adaptive Hash Index) 2. Binary search tree 3. Balanced binary tree (AVL tree) […]

Why does MongoDB use B-trees?

Overview MongoDB is a general-purpose, document-oriented distributed database. This is the official introduction to MongoDB. Different from traditional relational databases MySQL, Oracle and SQL Server, one of the most important features of MongoDB is “document-oriented”. Due to the different data storage methods, the interface provided to the outside world is no longer well-known. SQL, so […]

Java handwritten B-tree application expansion case

Java handwritten B-tree application expansion case 1. Introduction B-tree is a balanced search tree used to process large data sets, and its wide range of applications covers many fields. The following is some summary of B-tree applications: Database system: B-tree is often used in the index structure of database system, such as B+ tree. By […]

Distributed database: an in-depth explanation of B-tree index

Author: Zen and the Art of Computer Programming 1. Introduction Overview With the rapid development of Internet business and the generation and flow of massive data, traditional relational databases still have some bottlenecks in high concurrency situations. Therefore, distributed databases based on distributed computing architecture emerged as the times require. This article will start from […]

Draw b-tree using Python’s p5

Startup class import threading from p5 import * from com.dkd.data.mysql.b_tree import b_tree def setup(): size(1000, 800) background(255) global bt, font bt = b_tree(m=3) font = create_font(name=”C:\Windows\Fonts\consola.ttf”, size=16) def draw(): background(255) try: bt.draw_tree(width=width, font=font) except: pass # print(“****************************”) def input_num(): while True: num = input(“Please enter a number:”) try: bt.add_node(k=int(str(num).strip())) except: pass if __name__ == ‘__main__’: […]

C++ implements B-Tree (B-tree)

Reference: Mr. Deng Junhui “Data Structure C++ Language Implementation” B-tree nodes are composed of multiple keys, which are represented by vectors in the data structure. Similarly, children of keys also exist in vectors, and the structure is as follows: key: key0 key1 key2 key3 key4 (store value) child: child0 child1 child2 child3 child4 child5 (save […]

Red-black tree, B-tree and B+ tree and their applications

Directory 1. Binary search tree (Binary search tree, BST) 1.1 Find operation 1.2 Insert operation 1.3 Delete operation 1.4 Binary search tree that supports duplicate data 1.5 Performance Analysis of Binary Search Tree 2. Balanced binary search tree 2.1 Definition 2.2 Red-black tree 2.3 Why are red-black trees so popular 3. Why can’t the hash […]