user42160: Why did Core move from BDB to LevelDB? Why don't they use SQLite or move to Redis now? Is there a technical reason for this choice?

user208: Redis and LevelDB solve very different problems. We tried using SQLite and its performance was abysmal.
Bitcoin Core needs a database to store the set of unspent transaction outputs (UTXOs). This means we need fast simple reads, and fast batches of random updates.
We don't need a server/client architecture, as we can't have multiple applications accessing the database at once anyway: inconsistencies in the database would lead to forking risks (every node in the network needs to make exactly the same judgement about what is valid and invalid).

42160: <p>Why did Core move from <code>BDB</code> to <code>LevelDB</code>? Why don't they use <code>SQLite</code> or move to <code>Redis</code> now? Is there a technical reason for this choice?</p>
 208: <p>Redis and LevelDB solve very different problems. We tried using SQLite and its performance was abysmal.</p>

<p>Bitcoin Core needs a database to store the set of unspent transaction outputs (UTXOs). This means we need fast simple reads, and fast batches of random updates.</p>

<p>We don't need a server/client architecture, as we can't have multiple applications accessing the database at once anyway: inconsistencies in the database would lead to forking risks (every node in the network needs to make exactly the same judgement about what is valid and invalid).</p>
