[Design-Data-Intensive-Application] Data Structrure that Power Database

发布时间 2023-09-19 18:05:21作者: ylxn

1 Hash Table Index + Append Log

advantages

  • Perform > Random Write
  • Concurrent + Crash / recovery 

disadvantages

  • memory
  • range query

 

2 SSTable. (Sorted String Table). LSMtable

advantages

  • sorted. (Binary search)
  • key-- segment. Merge Sort
  • data structure. Red Black Tree   (Mem - table)
  • compact. (Write. Read)

disadvantages

lost update (memory)

 

3 B tree B+Tree

B Tree

K-V index

secondary index

branch factory

Block - Page

4 layers. 4kb 1 ref.

change one ref. need to modify 3 parts. (the parent, two children)