Database access

nm.vo.elte.hu/casjobs/login.aspx, the data is in the BitCoinPublic database

Tables


blockhash( -- enumeration of all blocks in the blockchain
  blockID int not null primary key, -- id used in this database (0 -- 277442, continous)
  bhash binary(32) not null, -- block hash (identifier in the blockchain)
  btime int not null, -- creation time (from the blockchain)
  txs int not null -- number of transactions
)

txhash( -- transaction ID and hash pairs
  txID int not null primary key, -- id used in this database (0 -- 30048982, continous)
  txhash binary(32) not null -- transaction hash used in the blockchain
)

addresses( -- BitCoin address IDs
  addrID int not null primary key, -- id used in this database (0 -- 24618958, continous, the address with addrID == 0 is invalid /blank, not used/)
  addr varchar(35) not null -- string representation of the address (note that the IDs are NOT ordered by the addr in any way)
)

tx( -- enumaration of all transactions
  txID int not null primary key, -- transaction ID (from the txhash table)
  blockID int not null, -- block ID (from the blockhash table)
  n_inputs int not null, -- number of inputs
  n_outputs int not null -- number of outputs
)

txin( -- list of all transaction inputs (sums sent by the users)
  txID int not null, -- transaction ID (from the txhash table)
  addrID int not null, -- sending address (from the addresses table)
  value bigint not null -- sum in Satoshis (1e-8 BTC)
) -- clustered index: txID, addrID


txout( -- list of all transaction outputs (sums received by the users)
  txID int not null, -- transaction ID (from the txhash table)
  addrID int not null, -- receiving address (from the addresses table)
  value bigint not null -- sum in Satoshis (1e-8 BTC)
) -- clustered index: txID, addrID

contraction( -- list of addresses possibly belonging to the same user (original dataset, based on transactions up to block 239999)
  addrID int not null primary key, -- address ID (from the addresses table)
  userID int not null -- ID of identified user (not continuos, each two addrID which belong to the same "user" appear as inputs in the same transaction at least once)
)

contraction_20131228( -- list of addresses possibly belonging to the same user, updated, up to block 277442
  addrID int not null primary key, -- address ID (from the addresses table)
  userID int not null -- ID of identified user (not continuos, each two addrID which belong to the same "user" appear as inputs in the same transaction at least once)
)

balances( -- balances of nodes at some specified times
  blockID int not null, -- ID of last block after which the balance was calculated (valid values: 100000,120000,140000,160000,180000,199956,228931,234999,277442 )
  addrID int not null, -- address ID (from the addresses table)
  balance bigint not null, -- balance in Satoshis (1e-8 BTC)
  constraint pk_balances primary key(blockID, addrID)
)

degree( -- node degrees (number of distinct transaction partners) after 277442 blocks
  addrID int not null primary key, -- address ID (from the addresses table)
  indeg int not null, -- indegree (number of distinct addresses which appear as inputs in transactions where this address appears as output)
  outdeg int not null -- outdegree (number of distinct addresses which appear as outputs in transactions where this address appears as input)
)

txedge( -- edges constructed from the transactions: e.g. a transaction with 2 inputs and 3 outputs results in 6 edges (all possible combinations)
-- an edge may appear multiple times, with the corresponding transaction IDs; JOIN with the txtime table to obtain a timestamped graph
  txID int not null, -- transaction ID in which this edge appears
  addrin int not null, -- sending address
  addrout int not null -- receiving address
) -- clustered index: txID

txedgeunique( -- edges constructed from the transactions; each edge appears only once, edges are indexed by the sending and receiving addresses
  addrin int not null, -- sending address
  addrout int not null, -- receiving address
  constraint pk_txedgeu primary key(addrin,addrout)
) -- nonclustered index: addrout,addrin

txtime( -- transaction timestamps (obtained from the blockchain.info site)
  txID int not null primary key, -- transaction ID
  unixtime int not null -- unix timestamp
)

back to the main page