<p>I've worked with Abe for some time; I'll try to have a run at it... I'm using the latest table list from Database version Abe39 on MySQL.</p>

<p><em>Utility tables:</em></p>

<ul>
<li><p>abe_lock:</p>

<p>Used for locking while performing DDL</p></li>
<li><p>configvar:</p>

<p>Configuration and results of some auto-detected SQL features.</p></li>
</ul>

<p><em>Blockchain tables:</em></p>

<ul>
<li><p>block:</p>

<p>Block hash and related statistic/infos.</p></li>
<li><p>block_next:</p>

<p>Forward-linking of blocks (blocks references only the previous block; this table links to the next one).</p></li>
<li><p>block_tx:</p>

<p>Links blocks to all their transactions in tx.</p></li>
<li><p>block_txin:</p>

<p>I believe this is merely a "shortcut" table that contains information accessible elsewhere: somewhat links together block_id, txin and the block it's spent on.</p></li>
<li><p>orphan_block:</p>

<p>Used to link orphan block (for eventual out of order/multi-threaded indexing?) References the previous block hash (since we do not have pref block_id yet).</p></li>
<li><p>tx:</p>

<p>A transaction: links to inputs (txin) and outputs (txout)</p></li>
<li><p>txin:</p>

<p>A single transaction input.</p></li>
<li><p>unlinked_txin:</p>

<p>As for orphan_block, links to txin we do not have loaded yet. References the txout_hash as we do not have yet the txout_id.</p></li>
<li><p>txout:</p>

<p>A single tx output</p></li>
<li><p>pubkey:</p>

<p>A bitcoin address (pubkey)</p></li>
<li><p>multisig_pubkey:</p>

<p>A multisig pubkey</p></li>
<li><p>chain:</p>

<p>Chain name and properties (one per cryptocoin)</p></li>
<li><p>magic           </p>

<p>Per-chain magic number</p></li>
<li><p>chain_candidate:</p>

<p>Identifies each block height and whenever it's part of the longest chain or not.</p></li>
<li><p>datadir:</p>

<p>Information relative to blockfile indexer</p></li>
</ul>

<p><em>Sequences:</em></p>

<p>This is pretty much DB-specific; on MySQL these are tables that have a single AUTO_INCREMENT column and are used to create unique keys for their respective tables:</p>

<ul>
<li>block_seq</li>
<li>chain_seq</li>
<li>datadir_seq</li>
<li>pubkey_seq</li>
<li>tx_seq</li>
<li>txin_seq</li>
<li>txout_seq</li>
</ul>

CC BY-SA 3.0
2017-09-04T16:31:16.890Z
Do you know how to parse the data content of tx-hash, after a MySQL query in python ?
pratiklodha
CC BY-SA 3.0
2017-09-06T05:16:54.513Z
I'm not sure I understand your question... There is no information you can get out of the tx hash itself, it's merely a unique 32bytes cryptographic hash that identifies this transaction. If your storage engine is configured to use the binary format, you can get a readable hash with `SELECT HEX(tx_hash) ...`. The actual TX informations is contained within all txin's txin_scriptSig and txout's txout_scriptPubKey fields for the transaction, if enabled. Those may be binary too, and are parseable according to Bitcoin's own pseudo language specifications.
Thomas Guyot-Sionnest
CC BY-SA 3.0
2015-01-31T07:16:31.240Z
2015-01-31T07:16:31.240Z
Thomas Guyot-Sionnest
<p>I've grabbed "Abe" and have started processing the blockchain into a database, but I can't really find documentation on what the various tables mean / are / contain.</p>

<p>Here's the list:</p>

<pre><code>abe_lock        
block           
block_next      
block_tx        
block_txin      
chain           
chain_candidate 
configvar       
datadir         
magic           
orphan_block    
policy          
pubkey          
tx              
txin            
txout           
unlinked_txin
</code></pre>

<p>I can make some guesses, but documentation would be better. Can anyone explain what's in each of these, or point me to some documentation?</p>

<p>Thank you, if you can help!</p>

<database><abe>
Meaning of the Tables in the Blockchain Database
headpoobah
# Meaning of the Tables in the Blockchain Database

(Asked by: username_0 on 2013-12-19)

I've grabbed "Abe" and have started processing the blockchain into a database, but I can't really find documentation on what the various tables mean / are / contain.

Here's the list:

```
abe_lock        
block           
block_next      
block_tx        
block_txin      
chain           
chain_candidate 
configvar       
datadir         
magic           
orphan_block    
policy          
pubkey          
tx              
txin            
txout           
unlinked_txin

```

I can make some guesses, but documentation would be better. Can anyone explain what's in each of these, or point me to some documentation?

Thank you, if you can help!

**Tags:** database, abe


---

## 1 answers

### Answer by username_1 on 2015-01-31. Score: 3

I've worked with Abe for some time; I'll try to have a run at it... I'm using the latest table list from Database version Abe39 on MySQL.

*Utility tables:*

* abe\_lock:

  Used for locking while performing DDL
* configvar:

  Configuration and results of some auto-detected SQL features.

*Blockchain tables:*

* block:

  Block hash and related statistic/infos.
* block\_next:

  Forward-linking of blocks (blocks references only the previous block; this table links to the next one).
* block\_tx:

  Links blocks to all their transactions in tx.
* block\_txin:

  I believe this is merely a "shortcut" table that contains information accessible elsewhere: somewhat links together block\_id, txin and the block it's spent on.
* orphan\_block:

  Used to link orphan block (for eventual out of order/multi-threaded indexing?) References the previous block hash (since we do not have pref block\_id yet).
* tx:

  A transaction: links to inputs (txin) and outputs (txout)
* txin:

  A single transaction input.
* unlinked\_txin:

  As for orphan\_block, links to txin we do not have loaded yet. References the txout\_hash as we do not have yet the txout\_id.
* txout:

  A single tx output
* pubkey:

  A bitcoin address (pubkey)
* multisig\_pubkey:

  A multisig pubkey
* chain:

  Chain name and properties (one per cryptocoin)
* magic

  Per-chain magic number
* chain\_candidate:

  Identifies each block height and whenever it's part of the longest chain or not.
* datadir:

  Information relative to blockfile indexer

*Sequences:*

This is pretty much DB-specific; on MySQL these are tables that have a single AUTO\_INCREMENT column and are used to create unique keys for their respective tables:

* block\_seq
* chain\_seq
* datadir\_seq
* pubkey\_seq
* tx\_seq
* txin\_seq
* txout\_seq

> **Comments:**
> **username_2**: Do you know how to parse the data content of tx-hash, after a MySQL query in python ?  
> **username_1**: I'm not sure I understand your question... There is no information you can get out of the tx hash itself, it's merely a unique 32bytes cryptographic hash that identifies this transaction. If your storage engine is configured to use the binary format, you can get a readable hash with `SELECT HEX(tx_hash) ...`. The actual TX informations is contained within all txin's txin_scriptSig and txout's txout_scriptPubKey fields for the transaction, if enabled. Those may be binary too, and are parseable according to Bitcoin's own pseudo language specifications.  

---

