So Bitcoin uses an HD wallet and thanks to that it can store keys in a hierarchy. But how exactly and in what format are they stored? Is each private and public key stored as a separate file? Are they stored in textual or binary format? Does Bitcoin use a database to store them?
The only resource I found is the source code of Bitcoin Core but are there any books or sites where I can find explanations about this?