I spent many years building a database backend from scratch. Right from the beginning, you need a fast way to look up a file address given a simple key, and that mechanism needs to be persistent. Thus to build a database you first need ... a database. Bootstrapping this thing was tricky.