Can blockchain data be stored in a relational database? If so what would the schema be? I know blockchain itself is a data structure, but how is the data stored? In JSON files? In a RDBMS? in CSV file? What do you see in the wild? I'm looking to see if I can implement something for a case study in a RDBMS which we are required to make use of.

Is there any example of a schema for a given blockchain with tables I can find? (I started creating my own and I think it's reasonable).

1 Answer 1


Blockchain: Chain of blocks


Who creates the blocks? Miners

Who validates, saves and relay these blocks? Full nodes



Different full node implementations for Bitcoin: Core, btcd, bcoin, gocoin, libbitcoin, knots, etc.

Database used by Bitcoin Core: Bitcoin Core stores the transaction-journal in groups of consecutive blocks in a series of large files whose format I believe closely matches the form used in the Bitcoin network protocols. But there is no prohibition on other software products doing something quite different.


Berkeley DB and SQLite are used for wallets

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.