Databases specialize in data storage. That’s a hard problem that requires a lot of work. Each application could solve this on their own, or they could combine efforts and solve the problem together.
What specifically are those problems for applications? Scaling, read/write speed, disk storage and efficiency, indexing, compression, and fast queries rank among the top issues.
So Bitcoin had two options:
- reinvent the wheel for the specialized data storage needs or
- use a generalized abstraction that’s already good at it.
That’s why Bitcoin uses a backend database (LevelDB). That database is better at doing specific data storage tasks than a naive Bitcoin implementation could do without an enormous amount of extra work.
Also, LevelDB isn’t a SQL database. SQL is just one category of database, there are many that specialize in different applications. LevelDB’s README is a great explainer of what’s useful about it.











