惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LangChain Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
S
Security Affairs
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hacker News: Ask HN
Hacker News: Ask HN
T
Tailwind CSS Blog
SecWiki News
SecWiki News
罗磊的独立博客
The Last Watchdog
The Last Watchdog
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium
Hugging Face - Blog
Hugging Face - Blog
T
Tor Project blog
V
Vulnerabilities – Threatpost
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
MongoDB | Blog
MongoDB | Blog
AWS News Blog
AWS News Blog
L
LINUX DO - 热门话题
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - Franky
Security Latest
Security Latest
G
GRAHAM CLULEY
C
CERT Recently Published Vulnerability Notes
H
Heimdal Security Blog
Recent Announcements
Recent Announcements
Apple Machine Learning Research
Apple Machine Learning Research
W
WeLiveSecurity
The Cloudflare Blog
B
Blog RSS Feed
B
Blog
Vercel News
Vercel News
T
Threatpost
小众软件
小众软件
H
Help Net Security
Jina AI
Jina AI
T
Threat Research - Cisco Blogs
Google DeepMind News
Google DeepMind News

blag

SQLite prefixes its temp files with `etilqs_` - blag Setsum - order agnostic, additive, subtractive checksum - blag Oldest recorded transaction - blag Replacing a cache service with a database - blag SQLite commits are not durable under default settings - blag PSA: SQLite WAL checksums fail silently and may lose data - blag Rickrolling Turso DB (SQLite rewrite in Rust) - blag Collection of insane and fun facts about SQLite - blag How bloom filters made SQLite 10x faster - blag In search of a faster SQLite - blag Galloping Search - blag Building a distributed log using S3 (under 150 lines of Go) - blag Zero Disk Architecture - blag PSA: Most databases do not do checksums by default - blag PSA: SQLite does not do checksums - blag Disaggregated Storage - a brief introduction - blag Why does SQLite (in production) have such a bad rep? - blag SQLite Slaps - blag Now - blag Learning C - blag Snapshot Testing - blag Win: contribution to libSQL (SQLite) codebase - blag Errata in Hekaton MVCC paper - blag Internet is wholesome: MVCC edition - blag It is becoming difficult for me to be productive in Python - blag MongoDB secondary only index - blag Introducing CaskDB – a project to teach you writing a key-value store - blag Recurse Center: Winter Break - blag Recurse Center Day 24: Hacking Go compiler to add a new keyword - blag Recurse Center Day 20: Django v4 upgrade (from v1) - blag Recurse Center Day 19 - blag Recurse Center Day 18 - blag Recurse Center Day 17 - blag Recurse Center Day 16: Open Source - blag Recurse Center Day 15: B Tree Algorithms - blag Recurse Center Day 14: NoSQL Transactions - blag Recurse Center Day 13: Why 'Raft'? - blag Recurse Center Day 12: Isolation Anomalies - blag Recurse Center Day 10: Learning Distributed Systems - blag Recurse Center Day 9: Papers We Love - blag Recurse Center Day 8: B Tree Fill Factor (Part 2) - blag Recurse Center Day 7: Basics of ncurses - blag Recurse Center Day 6: B Tree Root - blag Recurse Center First Week - blag Recurse Center Day 5: Garbage Collection Algorithms - blag Recurse Center Day 4: B Tree fill factor - blag Recurse Center Day 3: Hammock Driven Development - blag Recurse Center Day 2: BTree Node - blag Recurse Center Day 1: init - blag What I want to do at Recurse Center - blag Accepted to the Recurse Center! - blag Towards Inserting One Billion Rows in SQLite Under A Minute - blag Marshaling Struct with Special Fields to JSON in Golang - blag I ended up adding duplicate records on a unique index in MongoDB - blag Setting up Github Actions for Hugo - blag Moving to Hugo - blag Catching SIGTERM in Python - blag Git/Github fork-pull request-update cycle - blag Using uWSGI with Python 3 - blag When is my Cake Day? - blag Staying Ahead of Amazon, in Amazon Treasure Hunt Contest - blag How I Am Maintaining Multiple Emails For Git On A Same Machine - blag An exploit on Gaana.com gave me access to their entire User Database - blag Flashing Asus-WRT Merlin by XVortex on NetGear NightHawk R7000 - blag Install Windows 8 UEFI on Legacy BIOS with Clover (and Dual boot with Yosemite) - blag Scraping Javascript page using Python - blag Installing Transmission (remote and CLI) client on Raspberry Pi - blag About - blag Projects - blag
Recurse Center Day 11: B Tree Insertions - blag
2021-11-16 · via blag

This is a draft post that I have prematurely published. Currently, I am attending RC and I want to write as much as possible, log my daily learnings and activities. But, I also don't want to spend time on grammar and prose, so I am publishing all the posts which usually I'd have kept in my draft folder.

I was having trouble with the B Tree insertion algorithm. Here is what I was trying to do:

  1. The first phase was almost similar to search. Start with the root, find the appropriate key.
  2. Traverse down to the internal nodes, down to the leaf node
  3. Insert in the leaf node. If the node overflows, split the node
  4. (this part I was still coding, having difficulty with) If there is a node split, propagate this information upwards
  5. Recursively split if needed, all the way up to root

But the algorithm given in the CLRS is slightly different:

As with a binary search tree, we can insert a key into a B-tree in a single pass down the tree from the root to a leaf. To do so, we do not wait to find out whether we will actually need to split a full node in order to do the insertion. Instead, as we travel down the tree searching for the position where the new key belongs, we split each full node we come to along the way (including the leaf itself). Thus whenever we want to split a full node y, we are assured that its parent is not full.

  1. If the root is full, split it
  2. Find the internal node. If it is full, split it
  3. Keep on splitting till you find the leaf node
  4. Since you have been splitting along the way, no more splits can happen when you insert in the leaf

This is way easier!

  1. What I was trying to do was, bottom up approach and this one seems like top down
  2. I am not sure why, but I find this easier to code top down approach

While this is easier, this will split the root (or internal nodes) even though it is not needed. I was trying to optimise this, as to why split it unnecessarily.

I also consulted the assignments of few of the online courses:

  1. CMU Databases 15445: 2020 version (other versions seem to be asking to implement a Hash Index) has an assignment on B Trees, but it does not address this. I guess it’s up to the person who is implementing. However, I haven’t checked the assignment code yet.
  2. Berkeley CS186: The assignment is to implement a B Tree, but does not include more details.
  3. Utah CS6530: This goes really well into the details. They refer to Database Management Systems which neatly explain how to propagate the details to the parent.

Javascript Arrow Functions

I paired with Tal and Nicole to get some basic understanding of arrow functions. I don’t know JS enough, but now I learned how to use arrow functions!

Here are the two resources which helped me understand them better: