<p>If you settle for a relational DB you can try BitcoinDatabaseGenerator.<br>
<a href="https://github.com/ladimolnar/BitcoinDatabaseGenerator/releases" rel="nofollow">https://github.com/ladimolnar/BitcoinDatabaseGenerator/releases</a><br>
Sources and wiki: <a href="https://github.com/ladimolnar/BitcoinDatabaseGenerator" rel="nofollow">https://github.com/ladimolnar/BitcoinDatabaseGenerator</a></p>

<p>It may take you a few hours (it takes me 90 minutes but that will vary depending on your hardware and configuration) to transfer the blockchain files to the DB.</p>

<p>If you do that take a look at the views that are already defined in the DB, some of them may be useful to you.</p>

CC BY-SA 3.0
2018-02-01T16:15:13.563Z
Does BitcoinDatabaseGenerator work with Bitcoin Cash as well?
MmM
CC BY-SA 3.0
2015-05-08T20:12:03.837Z
2015-05-08T20:17:33.777Z
2015-05-08T20:17:33.777Z
Ladi
<p>This probably depends on the type of queries you want to make and the data you want to retrieve from the database.</p>

<p>Personally, I have made good experiences with using a graph-database to traverse the block chain (e.g., Neo4j). However, the graph model you choose will influence the efficiency of certain types of queries.</p>

CC BY-SA 3.0
2015-03-02T15:24:26.453Z
The queries will be transaction and address oriented, mostly address oriented, ie get all transactions with a payment bigger than X for this address over the past 6 months. You think I should go for a graph db?
Doug Peters
CC BY-SA 3.0
2015-03-03T19:59:47.013Z
The benefit of graph databases is that you can efficiently traverse the transaction graph, basically to follow the bitcoins from transaction to transaction. In your case a traditional relational database might be more efficient.
Malte
CC BY-SA 3.0
2016-07-07T16:30:28.320Z
How did you load the data? (Do you have code to do so?)
David Manheim
CC BY-SA 3.0
2015-03-02T13:27:07.177Z
2015-03-02T13:27:07.177Z
Malte
<p>I found blockchain to be reasonably manageable in size even if you are summarizing  individual transactions in each block across all blocks</p>

<p>if you want to try to quickly play with blockchain, then download postgreSQL backup dump from here <a href="http://dumps.webbtc.com/bitcoin/" rel="nofollow">http://dumps.webbtc.com/bitcoin/</a> - even if postgeSQL is not what you are looking for, you will be able to quickly re-shape this data with simple SQL and bulk load it to neo4j or whatever other DB in minutes</p>

CC BY-SA 4.0
2019-02-08T12:16:51.200Z
Unfortunately http://dumps.webbtc.com/bitcoin/ is no longer being updated.
Bruno
CC BY-SA 3.0
2015-04-27T02:55:12.713Z
2015-04-27T02:55:12.713Z
jiri
<p>If I wanted to imprint the blockchain data on a database, with the purpose of performing complex or just different than the RPC-based queries, how would I do it? Would I have to go for a relational database or a NoSQL one? Eventually the database would be filled with hundreds of millions of records, which databases would perform well (respond quickly) to these gigantic numbers?</p>

CC BY-SA 3.0
2015-04-30T04:09:30.983Z
did you ever get this started?
Phill Pafford
<blockchain><database>
How to store blockchain data
Doug Peters
# How to store blockchain data

(Asked by: username_0 on 2015-03-01)

If I wanted to imprint the blockchain data on a database, with the purpose of performing complex or just different than the RPC-based queries, how would I do it? Would I have to go for a relational database or a NoSQL one? Eventually the database would be filled with hundreds of millions of records, which databases would perform well (respond quickly) to these gigantic numbers?

**Tags:** blockchain, database

> **Comments:**
> **username_1**: did you ever get this started?  

---

## 3 answers

### Answer by username_2 on 2015-05-08. Score: 4

If you settle for a relational DB you can try BitcoinDatabaseGenerator.  
<https://github.com/ladimolnar/BitcoinDatabaseGenerator/releases>  
Sources and wiki: <https://github.com/ladimolnar/BitcoinDatabaseGenerator>

It may take you a few hours (it takes me 90 minutes but that will vary depending on your hardware and configuration) to transfer the blockchain files to the DB.

If you do that take a look at the views that are already defined in the DB, some of them may be useful to you.

> **Comments:**
> **username_3**: Does BitcoinDatabaseGenerator work with Bitcoin Cash as well?  

---

### Answer by username_4 on 2015-03-02. Score: 3

This probably depends on the type of queries you want to make and the data you want to retrieve from the database.

Personally, I have made good experiences with using a graph-database to traverse the block chain (e.g., Neo4j). However, the graph model you choose will influence the efficiency of certain types of queries.

> **Comments:**
> **username_0**: The queries will be transaction and address oriented, mostly address oriented, ie get all transactions with a payment bigger than X for this address over the past 6 months. You think I should go for a graph db?  
> **username_4**: The benefit of graph databases is that you can efficiently traverse the transaction graph, basically to follow the bitcoins from transaction to transaction. In your case a traditional relational database might be more efficient.  
> **username_5**: How did you load the data? (Do you have code to do so?)  

---

### Answer by username_6 on 2015-04-27. Score: 2

I found blockchain to be reasonably manageable in size even if you are summarizing individual transactions in each block across all blocks

if you want to try to quickly play with blockchain, then download postgreSQL backup dump from here <http://dumps.webbtc.com/bitcoin/> - even if postgeSQL is not what you are looking for, you will be able to quickly re-shape this data with simple SQL and bulk load it to neo4j or whatever other DB in minutes

> **Comments:**
> **username_7**: Unfortunately http://dumps.webbtc.com/bitcoin/ is no longer being updated.  

---

