Bitcoin Forum
July 02, 2024, 08:12:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SQL for storing blockchain transactions  (Read 1519 times)
BitCoinWarrior (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0



View Profile WWW
May 09, 2013, 10:00:26 AM
 #1

Is anybody saving the blockchain transactions.
Does anyone have a SQL schema they want to share?
Or can anyone help with pointers
maxmint
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
May 09, 2013, 11:48:39 AM
 #2

The block chain essentially is a database of all transactions. Why would you need another database?

My PGP-Key: 462D02D8
Verify my messages using keybase: https://keybase.io/maxmint
BitCoinWarrior (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0



View Profile WWW
May 09, 2013, 12:03:20 PM
 #3

because we can't query the blockchain for certain data. we need to store it in our own DB.
Calls like getRawTransaction, such as computing an addresses balance etc
btc6000
Member
**
Offline Offline

Activity: 116
Merit: 10


View Profile
May 10, 2013, 05:39:06 AM
 #4

https://github.com/jtobey/bitcoin-abe

We have come to be one of the worst ruled, one of the most completely controlled and dominated, governments in the civilized world—no longer a government by free opinion, no longer a government by conviction and the vote of the majority, but a government by the opinion and the duress of small groups of dominant men.
crazydownloaded
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
May 11, 2013, 04:24:39 AM
 #5

You should definitively consider using mongodb instead of a sql database:
- it stores json, so you can directly store the outputs of the bitcoind commands
- it's highly scalable (sharding and replica sets)
- it's very easy to use
- it can store UGE amounts of data and still perform very well on queries
- sql databases aren't a great thing because of the number of "sub tables" needed (to store the inputs/outputs of the transactions, etc.)

Est. February 2012
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!