Author

Topic: [CLOSED] Storing a blockchain in SQL database? (Read 1236 times)

newbie
Activity: 4
Merit: 0
November 11, 2015, 02:00:55 AM
#9
Hey... Question is not about where from query a data. Not about that, no. I know how to get and extract data that I need.

try bitcoin-abe

Your answer give me a though to see how existing block explorers works.

That's gonna take a massive amount of storage space, are you sure that's the most efficient way to store it?

Yes, there is will be some overhead while converting from Level to some SQL database, and I am ready for that.

I think, this question can be marked as closed.

Thank you all.
hero member
Activity: 896
Merit: 1006
That's gonna take a massive amount of storage space, are you sure that's the most efficient way to store it? SQL DBs are huge and pretty unwieldy.

I think the suggestion about RPC and using nodes is more on the money. You'll find some devs who can help you out here I'm sure.

You can always use the barracuda engine in mysql to compress the data, but RPC is indeed a good choice to... You don't need a dev to do this, just some basic php knowledge
full member
Activity: 212
Merit: 100
That's gonna take a massive amount of storage space, are you sure that's the most efficient way to store it? SQL DBs are huge and pretty unwieldy.

I think the suggestion about RPC and using nodes is more on the money. You'll find some devs who can help you out here I'm sure.
hero member
Activity: 896
Merit: 1006
try bitcoin-abe

BUT you NEED to find a database dump that is not to old, load the dump, then parse the rest of the blockchain... If you try to install bitcoin core, sync, then install bitcoin-abe and let it parse the whole blockchain, you'll be waiting for weeks...
sr. member
Activity: 362
Merit: 262
You will probably want to write a script that queries an api like blockchain.info and extract the data you want to store in your database.  I would imagine this being the easiest way

This won't work.  You will hit query limits with them. And/or it will be slow.

Run your own node and extract the data you need using rpc.
newbie
Activity: 4
Merit: 0
OK, here is a question for someone, who already stores a blockchain copy in SQL database. Are you found himself in situation in which you have to rewrite blockchain data which are already stored? No matters by which reason it was been caused by.
newbie
Activity: 4
Merit: 0
Oh, thank you. But my question is not about this. I want to know that is this method of storage is safe? At this word I assume that I will not want to change any data that was already stored. I want to know about right way to do that. I do not know is there any situation exists which can trigger me to work with some data included in blocks which are already stored?
member
Activity: 102
Merit: 10
You will probably want to write a script that queries an api like blockchain.info and extract the data you want to store in your database.  I would imagine this being the easiest way
newbie
Activity: 4
Merit: 0
Hello. I want to duplicate and store all blockchain data in SQL database, periodically making a sync. This period will be based on confirmation of every new block. So, for example, if current block height equals to 1000, and I have successfully store all blockchain data up to this height, next block which I will store will be the next confirmed block at number 1001. I want to know about that is this way to synchronise blockchain with SQL database is safe and I will not need to change already stored data? Which way to do it is most right?
Jump to: