Pages:
Author

Topic: Blockchain used as a database storage system for records to replace MYSQL? (Read 1727 times)

legendary
Activity: 1764
Merit: 1007
There are storj or maidsafe being built for that kind of scenario
hero member
Activity: 518
Merit: 500
Trust me!
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.
legendary
Activity: 1176
Merit: 1011
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.
sr. member
Activity: 462
Merit: 250
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?
legendary
Activity: 2940
Merit: 1865
...

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...
sr. member
Activity: 350
Merit: 252
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.
legendary
Activity: 3066
Merit: 1047
Your country may be your worst enemy
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.
legendary
Activity: 2464
Merit: 1145
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.
legendary
Activity: 2940
Merit: 1865
...

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...
donator
Activity: 1617
Merit: 1012
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?
legendary
Activity: 1274
Merit: 1000
★ BitClave ICO: 15/09/17 ★
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.
donator
Activity: 1617
Merit: 1012
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.
full member
Activity: 165
Merit: 101
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.
legendary
Activity: 2464
Merit: 1145
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.
full member
Activity: 165
Merit: 101
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.
legendary
Activity: 1442
Merit: 1186
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.
legendary
Activity: 1148
Merit: 1014
In Satoshi I Trust
full member
Activity: 165
Merit: 101
yea i guess public data storage would make more sense. but say if a big company wanted the redudancy and they used this method?
sr. member
Activity: 490
Merit: 250
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.
hero member
Activity: 874
Merit: 1000
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.
Pages:
Jump to: