Bitcoin Forum
May 09, 2024, 01:58:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Blockchain used as a database storage system for records to replace MYSQL?  (Read 1694 times)
box0211 (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 101


View Profile
April 18, 2015, 03:02:15 PM
 #1

I was wondering has there been anything built that utilizes the blockchain as a database storage system either in Bitcoin or another Alt? Say I run the CMS Wordpress and I have a bunch of users. I want these user records which contain their name/phone/email/address sit on the blockchain and retrievable via the blockchain. It could be encrypted or not. These records can be retrieved within the CMS without the need to store it anywhere on the web server thereby replacing MYSQL. Well not replacing mysql completely, but only store selective data that is important.

Does anyone have something like this yet?

I know it can kind of be done on the Bitcoin Blockchain using OP_RETURN. But that only fits 40bytes at the moment. It's going to goto 80bytes eventually as it seems. Or is there another Alt more suited for this use case? One issue is redundancy, Bitcoin would have the most redundancy as its the most distributed with over 6000 nodes. Other alts could very well die and you'll lose all your data if they dont get more nodes up.
1715263107
Hero Member
*
Offline Offline

Posts: 1715263107

View Profile Personal Message (Offline)

Ignore
1715263107
Reply with quote  #2

1715263107
Report to moderator
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715263107
Hero Member
*
Offline Offline

Posts: 1715263107

View Profile Personal Message (Offline)

Ignore
1715263107
Reply with quote  #2

1715263107
Report to moderator
1715263107
Hero Member
*
Offline Offline

Posts: 1715263107

View Profile Personal Message (Offline)

Ignore
1715263107
Reply with quote  #2

1715263107
Report to moderator
TKeenan
Hero Member
*****
Offline Offline

Activity: 874
Merit: 1000



View Profile
April 18, 2015, 03:18:33 PM
 #2

I was wondering has there been anything built that utilizes the blockchain as a database storage system either in Bitcoin or another Alt? Say I run the CMS Wordpress and I have a bunch of users. I want these user records which contain their name/phone/email/address sit on the blockchain and retrievable via the blockchain. It could be encrypted or not. These records can be retrieved within the CMS without the need to store it anywhere on the web server thereby replacing MYSQL. Well not replacing mysql completely, but only store selective data that is important.

Does anyone have something like this yet?

I know it can kind of be done on the Bitcoin Blockchain using OP_RETURN. But that only fits 40bytes at the moment. It's going to goto 80bytes eventually as it seems. Or is there another Alt more suited for this use case? One issue is redundancy, Bitcoin would have the most redundancy as its the most distributed with over 6000 nodes. Other alts could very well die and you'll lose all your data if they dont get more nodes up.
This is the same as using your Porsche 911 to haul patio bricks from Home Depot.  It CAN be done, but it is the dumbest possible application.  The blockchain is remarkable.  The blockchain does hold data.  However, it is a very poor replacement for databases.  What's wrong with MYSQL?  What advantages do you see in putting all this crap into the blockchain?  The only thing which needs to go into the blockchain is stuff which is very critical regarding change to the record.  Your data certainly doesn't have that issue.
ashour
Sr. Member
****
Offline Offline

Activity: 490
Merit: 250


View Profile
April 18, 2015, 03:36:03 PM
 #3

It could be used as a database as long as it isn't holding any private information like address,cc number etc. It should also be encrypted throw a hash and pushed on the bitcoin blockchain. The bitcoin blockchain could better be used for public data and records than a database.
box0211 (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 101


View Profile
April 18, 2015, 03:39:43 PM
 #4

yea i guess public data storage would make more sense. but say if a big company wanted the redudancy and they used this method?
LiteCoinGuy
Legendary
*
Offline Offline

Activity: 1148
Merit: 1010


In Satoshi I Trust


View Profile WWW
April 18, 2015, 03:42:12 PM
 #5

Bitcoin 101 - A Million Killer Apps

https://www.youtube.com/watch?v=4nOfHpOFhN8


take a look.

coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
April 18, 2015, 04:50:47 PM
 #6

Do you have bitcoin core or bitcoin-qt? That long wait when you boot up is what would happen when trying to retrieve info from a blockchain type database. MySQL is fast at pulling info. The blockchain though has to validate each block and then parse the data. It would make for a VERY slow and inefficient replacement to your typical database.

box0211 (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 101


View Profile
April 18, 2015, 05:12:33 PM
 #7

but say i dont need my data immediately and its not time critical data. say i just want to have a place to store it for redundancy backup for later retrieval. no number of backups or raid storage devices is going to beat the scale of bitcoin's 6000+ nodes. its like replicating your data on 6000+ computers. what other system is even comparable? bitcoin's blockchain might not be the most efficient for such a system, but it definitely is the most reliable so far among its peers.
criptix
Legendary
*
Offline Offline

Activity: 2464
Merit: 1145


View Profile
April 18, 2015, 05:20:13 PM
 #8

but say i dont need my data immediately and its not time critical data. say i just want to have a place to store it for redundancy backup for later retrieval. no number of backups or raid storage devices is going to beat the scale of bitcoin's 6000+ nodes. its like replicating your data on 6000+ computers. what other system is even comparable? bitcoin's blockchain might not be the most efficient for such a system, but it definitely is the most reliable so far among its peers.

Main problem will be blockchain bloat. The bigger it goes the harder it will be to maintain decentralisation. In the end it will be something along the line of cloud storage.

                     █████
                    ██████
                   ██████
                  ██████
                 ██████
                ██████
               ██████
              ██████
             ██████
            ██████
           ██████
          ██████
         ██████
        ██████    ██████████████████▄
       ██████     ███████████████████
      ██████                   █████
     ██████                   █████
    ██████                   █████
   ██████                   █████
  ██████
 ███████████████████████████████████
██████████████████████████████████████
 ████████████████████████████████████

                      █████
                     ██████
                    ██████
                   ██████
                  ██████
                 ████████████████████
                 ▀██████████████████▀
.LATTICE - A New Paradigm of Decentralized Finance.

 

                   ▄▄████
              ▄▄████████▌
         ▄▄█████████▀███
    ▄▄██████████▀▀ ▄███▌
▄████████████▀▀  ▄█████
▀▀▀███████▀   ▄███████▌
      ██    ▄█████████
       █  ▄██████████▌
       █  ███████████
       █ ██▀ ▀██████▌
       ██▀     ▀████
                 ▀█▌
 

             ▄████▄▄   ▄
█▄          ██████████▀▄
███        ███████████▀
▐████▄     ██████████▌
▄▄██████▄▄▄▄█████████▌
▀████████████████████
  ▀█████████████████
  ▄▄███████████████
   ▀█████████████▀
    ▄▄█████████▀
▀▀██████████▀
    ▀▀▀▀▀
box0211 (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 101


View Profile
April 18, 2015, 05:53:21 PM
 #9

isn't there a pruning setup where you can prune the data after a certain time? say the blockchain can only hold 1-2 gb of data for 1 month and then it deletes it and recycles the storage. thats one way to reduce the bloat.
Soros Shorts
Donator
Legendary
*
Offline Offline

Activity: 1617
Merit: 1012



View Profile
April 18, 2015, 05:54:34 PM
 #10

but say i dont need my data immediately and its not time critical data. say i just want to have a place to store it for redundancy backup for later retrieval. no number of backups or raid storage devices is going to beat the scale of bitcoin's 6000+ nodes. its like replicating your data on 6000+ computers. what other system is even comparable? bitcoin's blockchain might not be the most efficient for such a system, but it definitely is the most reliable so far among its peers.

On my PC the blockchain right now takes up 37.1 GB of disk space. I don't see how this idea can be practical or scalable.
cakir
Legendary
*
Offline Offline

Activity: 1274
Merit: 1000


★ BitClave ICO: 15/09/17 ★


View Profile WWW
April 18, 2015, 05:59:39 PM
 #11

It can be developed as a "blogchain" that chain's main purpose is to publish blog posts.
Let's say If I steal someone's blog post on this chain; it'll reject me so I won't be able to post it. Authorship can be verified via public address signing etc.

iThenticate like tools is also needed.

Ps: I've given this example because of mysql & wordpress (blog) relation.

Conclusion, yes it can be done.


                  ,'#██+:                 
              ,█████████████'             
            +██████████████████           
          ;██████████████████████         
         ███████:         .███████`       
        ██████               ;█████'      
      `█████                   #████#     
      ████+                     `████+    
     ████:                        ████,   
    ████:    .#              █     ████   
   ;███+     ██             ███     ████  
   ████     ███'            ███.    '███, 
  +███     #████           ,████     ████ 
  ████     █████ .+██████: █████+    `███.
 ,███     ███████████████████████     ████
 ████     ███████████████████████'    :███
 ███:    +████████████████████████     ███`
 ███     █████████████████████████`    ███+
,███     ██████████████████████████    #███
'███    '██████████████████████████    ;███
#███    ███████████████████████████    ,███
████    ███████████████████████████.   .███
████    ███████████████████████████'   .███
+███    ███████████████████████████+   :███
:███    ███████████████████████████'   +███
 ███    ███████████████████████████.   ███#
 ███.   #██████████████████████████    ███,
 ████    █████████████████████████+   `███
 '███    '████████████████████████    ████
  ███;    ███████████████████████     ███;
  ████     #████████████████████     ████ 
   ███#     .██████████████████     `███+ 
   ████`      ;██████████████       ████  
    ████         '███████#.        ████.  
    .████                         █████   
     '████                       █████    
      #████'                    █████     
       +█████`                ██████      
        ,██████:           `███████       
          ████████#;,..:+████████.        
           ,███████████████████+          
             .███████████████;            
                `+███████#,               
Soros Shorts
Donator
Legendary
*
Offline Offline

Activity: 1617
Merit: 1012



View Profile
April 18, 2015, 06:06:18 PM
 #12

Ps: I've given this example because of mysql & wordpress (blog) relation.

This is off-topic, but I feel like it is unfortunate that Wordpress was built on top of MySQL because it is a very inefficient technology stack based on what's available today. It would have been more appropriate to have built Wordpress on top of a noSQL document database such as CouchDB or MongoDB. Unfortunately, when Wordpress was first designed noSQL databases did not exist.

Back on topic, MySQL is just not just a storage system - it is a relational database. With a relational database system you expect things like records, tables, indexes, primary keys, constraints, yadayadayada ... How are you going to implement these features on top of the blockchain?
OROBTC
Legendary
*
Offline Offline

Activity: 2912
Merit: 1852



View Profile
April 18, 2015, 06:23:33 PM
 #13

...

You can use the blockchain to store almost unlimited data by hashing...  factom.org, bitproof.io and proofofexistence.com are all using variations of this general idea (of using OP_RETURN).  The latter two are cheap (small fraction of a Bitcoin) to experiment with...

You can put up public links to data tables for example rather easily.  And it is just as easy to use the hashing function to keep data private.

See my comments and example at:

https://bitcointalk.org/index.php?topic=986206.20

*   *   *

I do not know how to integrate a database via hashing at OP_RETURN or if it even possible.

*   *   *

Of course, one could just put up a MySQL database on your website probably even easier...
criptix
Legendary
*
Offline Offline

Activity: 2464
Merit: 1145


View Profile
April 18, 2015, 06:30:03 PM
 #14

isn't there a pruning setup where you can prune the data after a certain time? say the blockchain can only hold 1-2 gb of data for 1 month and then it deletes it and recycles the storage. thats one way to reduce the bloat.

i dont think it would be possible for data storage, because the data would be lost.
there would be only evidence that the blockchain ones had the data.

every other method would not be efficient enough to size down the blockchain.

                     █████
                    ██████
                   ██████
                  ██████
                 ██████
                ██████
               ██████
              ██████
             ██████
            ██████
           ██████
          ██████
         ██████
        ██████    ██████████████████▄
       ██████     ███████████████████
      ██████                   █████
     ██████                   █████
    ██████                   █████
   ██████                   █████
  ██████
 ███████████████████████████████████
██████████████████████████████████████
 ████████████████████████████████████

                      █████
                     ██████
                    ██████
                   ██████
                  ██████
                 ████████████████████
                 ▀██████████████████▀
.LATTICE - A New Paradigm of Decentralized Finance.

 

                   ▄▄████
              ▄▄████████▌
         ▄▄█████████▀███
    ▄▄██████████▀▀ ▄███▌
▄████████████▀▀  ▄█████
▀▀▀███████▀   ▄███████▌
      ██    ▄█████████
       █  ▄██████████▌
       █  ███████████
       █ ██▀ ▀██████▌
       ██▀     ▀████
                 ▀█▌
 

             ▄████▄▄   ▄
█▄          ██████████▀▄
███        ███████████▀
▐████▄     ██████████▌
▄▄██████▄▄▄▄█████████▌
▀████████████████████
  ▀█████████████████
  ▄▄███████████████
   ▀█████████████▀
    ▄▄█████████▀
▀▀██████████▀
    ▀▀▀▀▀
countryfree
Legendary
*
Offline Offline

Activity: 3052
Merit: 1047

Your country may be your worst enemy


View Profile
April 18, 2015, 06:45:17 PM
 #15

How do you insert data? You have to make a transaction each time? And how do you update the database? You cannot erase data in the blockchain! I have a MySQL database for my business, and I can't imagine using the blockchain in its place, even though I admire the robustness of the blockchain.

I used to be a citizen and a taxpayer. Those days are long gone.
box0214
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251


View Profile
April 19, 2015, 06:06:44 AM
 #16

each update to a record would be recorded on the blockchain and be considered as a revision that you can always view back. thats just my thinking of it. still pondering the possibilities.
OROBTC
Legendary
*
Offline Offline

Activity: 2912
Merit: 1852



View Profile
April 19, 2015, 06:47:13 PM
 #17

...

Another possible solution to the updating of databases problem (as long as you don´t have to it every single time you insert a new record) is to insert a new hashed link (once per day for example) to a database at your website or wherever.  Inserting a hash into a BTC transaction, say every day or so, would not bloat the blockchain.  This of course would be for databases that do not need to be used (accessed) every second...

factom.org may offer even better solutions soon, as I think their goal is to put up ONE hashed transaction that would link to MANY other items.

You could always ask factom...
Bizmark13
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


WikiScams.org - Information about Bitcoin Scams


View Profile
April 20, 2015, 05:30:22 AM
 #18

I was wondering has there been anything built that utilizes the blockchain as a database storage system either in Bitcoin or another Alt? Say I run the CMS Wordpress and I have a bunch of users. I want these user records which contain their name/phone/email/address sit on the blockchain and retrievable via the blockchain. It could be encrypted or not. These records can be retrieved within the CMS without the need to store it anywhere on the web server thereby replacing MYSQL. Well not replacing mysql completely, but only store selective data that is important.

Does anyone have something like this yet?

I know it can kind of be done on the Bitcoin Blockchain using OP_RETURN. But that only fits 40bytes at the moment. It's going to goto 80bytes eventually as it seems. Or is there another Alt more suited for this use case? One issue is redundancy, Bitcoin would have the most redundancy as its the most distributed with over 6000 nodes. Other alts could very well die and you'll lose all your data if they dont get more nodes up.

I've dealt with MySQL databases before and sometimes they can grow to become really large. I once had a phpBB database take up 1 GB. Blockchain bloating could be a real problem. Datacoin (link) was an altcoin that served a similar function (storing raw data) and it failed for many reasons, but blockchain bloating was definitely one of them.

And what incentive would nodes have to host this database anyway?

isn't there a pruning setup where you can prune the data after a certain time? say the blockchain can only hold 1-2 gb of data for 1 month and then it deletes it and recycles the storage. thats one way to reduce the bloat.

You would need to find a way to selectively prune some data whilst retaining other types of data. Otherwise, you would have things like blog posts, comments, user accounts, etc. disappear after a certain length of time depending on how often it's pruned. This could probably have some uses but it's not really something that most people would want for their blog/forum/whatever.

It can be developed as a "blogchain" that chain's main purpose is to publish blog posts.
Let's say If I steal someone's blog post on this chain; it'll reject me so I won't be able to post it. Authorship can be verified via public address signing etc.

iThenticate like tools is also needed.

Ps: I've given this example because of mysql & wordpress (blog) relation.

Conclusion, yes it can be done.

I proposed a similar idea about putting forums, imageboards, textboards, BBS systems, microblogs, etc. into a blockchain here. The website-on-a-blockchain idea works best for sites which have low storage requirements and are regularly pruned.

Ps: I've given this example because of mysql & wordpress (blog) relation.

This is off-topic, but I feel like it is unfortunate that Wordpress was built on top of MySQL because it is a very inefficient technology stack based on what's available today. It would have been more appropriate to have built Wordpress on top of a noSQL document database such as CouchDB or MongoDB. Unfortunately, when Wordpress was first designed noSQL databases did not exist.

Back on topic, MySQL is just not just a storage system - it is a relational database. With a relational database system you expect things like records, tables, indexes, primary keys, constraints, yadayadayada ... How are you going to implement these features on top of the blockchain?

Doesn't WordPress also support SQLite as well?
Kazimir
Legendary
*
Offline Offline

Activity: 1176
Merit: 1003



View Profile
April 20, 2015, 05:40:50 AM
 #19

The Blockchain is not a solution to store, retrieve or share data efficiently. We already have great solutions for that: MySQL and BitTorrent.

The Blockchain is a solution to achieve trustless consensus on global ledger entries. There's plenty of useful things you can do with that, but storing large chunks of data is not typically one of them.

Proof of ownership or existence of particular data (by putting its hash in the blockchain): yes. Storing the actual data itself: no.

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
ensurance982
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


Trust me!


View Profile
April 20, 2015, 11:29:10 AM
 #20

Too much overhead and other concerns in order to use the real Bitcoin blockchain that way, I guess. I think the most you could use the Bitcoin blockchain for is to store hashes or fingerprints of important documents or messages, in order to prove their existence at a specific point in time.

                                                                                                                      We Support Currencies: BTC, LTC, USD, EUR, GBP
Pages: [1] 2 »  All
  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!