scrobble.life
#steemit

[STEEMSQL.COM] A public SQL server database with all Steemit blockchain data

Did you ever wanted to easily access data contained in the Steem blockchain and perform analysis or find valuable information. But not everybody has programming skills to gather those data and compute the wanted result.

Therefore, I created a publicly available SQL database with all the blockchain data in it.

Why use a SQL database?

The main advantage having such a database is the fact data are structured and easily accessible from any application able to connect to a SQL Server database. Having a SQL Server database makes it possible to produce quick answers to queries.

Simply put, a query is a question. You ask the server form something and it sends back an answer (called the query result set). For example, when dealing with large amounts of data as Steem blockchain data, you might want quick answers to questions (queries) such as:

  • What was the Steem power down volume during the past six weeks?
  • Which are the top 10 most rewarded post ever?
  • Did I get, me or my posts, mentioned in any post or comment?
  • How many posts are talking about ants?

Browsing the blockchain over and over to retrieve and compute such information is time and resource consuming. If you don’t have a local copy of the blockchain, instead of downloading the whole data from some external public node to process it, you will send your query to SteemSQL server and get only the requested information, saving tons of bandwidth.

Let’s have a look at some technical details

Database diagram

The Blocks table contains bare block information (timestamp, witness …) Each block can contains Transactions Depending on each transaction type, the associated transaction’s data is stored in the related table.

Full text search

The database has been full text search enabled. This allow fast search of information within post and replies.

Let say I want to know if anyone mentioned me in a post or comment, the following simple query will do the trick

SELECT author, title, body, url FROM TxComments WHERE CONTAINS(body, '@arcange')

Database Connection information:

Here the information to connect and query the database:

Server: sql.steemsql.com User: steemit Password: steemit

Database name: DBSteem

How to retrieve query the database

  • Using Microsoft Excel

Check this tutorial to see how to create an analysis report with Excel

  • If you’re a python programmer
import pypyodbc
connection = pypyodbc.connect('Driver={SQL Server};'
                                'Server=sql.steemsql.com;'
                                'Database=DBSteem;'
                                'uid=steemit;pwd=steemit')
cursor = connection.cursor() 
SQLCommand = ("YOUR SQL QUERY”)
cursor.execute(SQLCommand)
# do whatever you want with the retrieved data
connection.close()

Support

If you need help, have any comment or request, join steemsql channel on steemit.chat

Availability and performance

The SQL server is hosted in a datacenter with 24/7/365 availability. Available output bandwidth is up to 500Mb/s

New data from the latest blocks are injected in the database every 10 seconds.

The server is currently hosted in a shared infrastructure. I will monitor server load and if it requires more resources, I will allocate any reward to this post to a dedicated infrastructure.

You like it, please upvote or follow me

Comments · 27

  • @marianozetax(38)· 2784d

    Hi, I can't connect using SSMS, do you use default port? (1433)

    Ping to server is not responding, I'm not sure if i'm doing something wrong :(

    Thanks for sharing!

  • @mellofello(68)· 2961d

    Hi @arcange. Is this sever offline or no longer available?

  • @stef(59)· 3128d

    the steemit account looks suspended, the service is no longer available?

  • @ekonugraha(59)· 3179d

    Amazing. Glad to found this post. Thank you for providing the infrastructure. I have accessed it and it works well

  • @alketcecaj(55)· 3198d

    The database here is not responding!! I'm trying to connect to it from Java code and it says "Communication link failure". Also from comand line I run a ping and none of the packets come back!

  • @lestatisticien(43)· 3227d

    Here’s a sad scene for you. About 4 people have read this post I made about 3 days ago: “Can you supply some block-chain data for payment?”. Your post suggests that there must be or than 20 people in the community who might have been alerted to my post, and some would have promptly sent me to your service, which clearly needs to be well supported.

    New Steemit posts disappear into ‘ether’ 20 minutes, and will turn up on peoples’ Feeds only if they are Following the author!

    Anyway, I will be trying to use your service soon, and pay suitably. I am experienced programmer; but have not bothered to learn Python and only occasionally use SQL (inside SAS). I will come back when I have done the needed studying.

    Cheers!

  • @lestatisticien(43)· 3227d

    Here’s a sad scene for you. About 4 people have read this post I made about 3 days ago: “Can you supply some block-chain data for payment?”. Your post suggests that there must be or than 20 people in the community who might have been alerted to my post, and some would have promptly sent me to your service, which clearly needs to be well supported.

    New Steemit posts disappear into ‘ether’ 20 minutes, and will turn up on peoples’ Feeds only if they are Following the author!

    Anyway, I will be trying to use your service soon, and pay suitably. I am experienced programmer; but have not bothered to learn Python and only occasionally use SQL (inside SAS). I will come back when I have done the needed studying.

    Cheers!

  • @stef(59)· 3247d

    Why MS SQL server, and not something more open like MySQL or PostgreSQL?

  • @carlgnash(71)· 3313d

    Thank you so much for hosting this! You are my hero! Successfully connected and doing some poking around in the data for fun tonight :)

  • @khuziyad(38)· 3315d

    Doesn't this defeat the purpose of decentralization? If there is a central database with all the information on the blockchain, then wouldn't that create a vulnerability?

    This would be better if the database itself was decentralized... I think I'll code one like this. Thank you for your information! :)

  • @segyepark(66)· 3336d

    This is awesome! Thank you for your effort.

  • @vaibhavshah(57)· 3339d

    hi @arcange, Is this database still working ? If yes Then I am not able to connect to server using Sql server management studio.

  • @abit(71)· 3628d

    http://steemsql.com/ is not working?

  • @cristi(71)· 3631d

    hey, I'm playing with it right now. how I can I see the full architecture of the database?

  • @lukestokes(77)· 3632d

    This is way freaking cool. Man, I fall behind on #dev in steemit.chat by just a couple days and miss amazing gems like this. Well done!

  • @bbrewer(60)· 3632d

    I'm late to the party but I am excited about this as I am learning SQL at work and would love to use that knowledge to understand Steemit better and contribute to the community with that knowledge.

  • @williambanks(70)· 3632d

    Argh!!!! I was just trying to build one of these! I'm not sure whether to be upset I spent 2 days trying to make it work or ecstatic that whatever guided me, guided you there first.

    Eitherway, I'm glad you did this, but super jealous you managed to pull it off faster than I could :)

    Congratulations though, you earned my upvote. I'm following you now too!

  • @stranger27(68)· 3632d

    Cool!

  • @abit(71)· 3632d

    This is good. Although I like something like PhpMyAdmin more. What hardware is your service running on? I'm curious about the scalability.

  • @l0k1(70)· 3632d

    the differences between the graph database and the monolithinc, intransient relational database takes some compilation of data, and new blocks alter records, in ways that can be difficult to adapt, such as if a poster makes a really big edit, and suddenly the datatype has been overflowed.

    But I think this is a cool idea. It might make a model for moving from a memory heavy graphene database to a storage heavy sql, maybe some sort of hybrid to cache data for faster retrieval or so.

  • @kyriacos(72)· 3632d

    @arcange

    this is severely underrated. gave you my full blown 100%. we need this.

  • @bitcalm(65)· 3632d

    How did you populate the database to begin with? If you're using the RPC mechanism, after 30 days some data is no longer returned. For example, active_votes is empty for all posts after their second payout. You can even see this on steemit.com where old posts have zero upvotes.

  • @bitcoiner(65)· 3633d

    This is a really great thing you have going here! Kudos for setting up a public node and service for the community. I sincerely believe this post should be upvoted like crazy and end with 3 or 4 figures. This does deserve more notice and appreciation. But from me, you've my upvote and follow. Thank you.

  • @kaptainkrayola(56)· 3633d

    SQL Server is great - thank you very much for providing this!

  • @ausbitbank(74)· 3633d

    Thankyou heaps for doing this! I have a heap of ideas for queries but I've been trying to avoid the overhead of running my own full node - this is a far more efficient way to do it :) I'll be following, great work

  • @steempowerwhale(59)· 3633d

    As soon as I have some time I will use your steemit database because I am a data fanatic. Thank you for making this available. I am following you now.

  • @anduweb(61)· 3633d

    That's nice of you to make this available. hopefully you won't get flooded with requests that the resources requirements will require too much of an overhead :)