I.T. Spices The LINUX Way

Python In The Shell: The STEEMIT Ecosystem – Post #87

THE STEEMIT BLOCKCHAIN INTO THE DATABASE


  Please refer to the previous post for a more thorough understanding: https://steemit.com/blockchain/@lightingmacsteem/4jczvk-i-t-spices-the-linux-way

   As seen on the previous post’s screenshot on what a single STEEMIT blockchain record consists of, I will list it here as follows:

  • block_id
  • extensions
  • previous
  • signing_key
  • timestamp
  • transaction_ids
  • transaction_merkle_root
  • transactions
  • witness
  • witness_signature

Here is another look what one blockchain record in JSON format holds:


We need to find a way to make these records reside on the database, with each record title in a line becomes the COLUMN title inside the table on the database. Also, we can clearly see that the JSON title “transactions” will have the most data in it.

Having observed these, we now know the columns of our database, and to make all these much simpler, we will place the column “transactions” at the very last when we will start to CREATE the table and INSERT afterwards.

The arrangement of the database column names will be like this then just to give a better view:

id | block_id | extensions | previous | signing_key | timestamp | transaction_ids | transaction_merkle_root | witness | witness_signature | transactions

One thing to note is that we added a new column named “id” on the database, this is like a unique number that will count how many lines of records we already have on the database.

As we can also observe the transactions column is arranged last, this is to have an easier text parsing mechanism in our later exercises as the transactions will have the most data to mine.

The next post will be worthy of a longer explanation as well as a deeper understanding of how and why python with the linux cli does the job efficiently.

The long wait for everything python is almost over. Python codes next.

“You Have Money You Say….. What About Purpose?”

Sort:  

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

Coin Marketplace

STEEM 0.16
TRX 0.16
JST 0.030
BTC 58224.09
ETH 2508.01
USDT 1.00
SBD 2.34