Title: Blockchain used as a database storage system for records to replace MYSQL? Post by: box0211 on April 18, 2015, 03:02:15 PM 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. Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: TKeenan on April 18, 2015, 03:18:33 PM 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. 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.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. Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: ashour on April 18, 2015, 03:36:03 PM 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.
Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: box0211 on April 18, 2015, 03:39:43 PM yea i guess public data storage would make more sense. but say if a big company wanted the redudancy and they used this method?
Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: LiteCoinGuy on April 18, 2015, 03:42:12 PM Bitcoin 101 - A Million Killer Apps
https://www.youtube.com/watch?v=4nOfHpOFhN8 take a look. Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: coinableS on April 18, 2015, 04:50:47 PM 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.
Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: box0211 on April 18, 2015, 05:12:33 PM 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.
Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: criptix on April 18, 2015, 05:20:13 PM 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. Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: box0211 on April 18, 2015, 05:53:21 PM 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.
Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: Soros Shorts on April 18, 2015, 05:54:34 PM 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. Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: cakir on April 18, 2015, 05:59:39 PM 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. Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: Soros Shorts on April 18, 2015, 06:06:18 PM 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? Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: OROBTC on April 18, 2015, 06:23:33 PM ...
You can use the blockchain to store almost unlimited data by hashing... factom.org (http://factom.org), bitproof.io (http://bitproof.io) and proofofexistence.com (http://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... Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: criptix on April 18, 2015, 06:30:03 PM 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. Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: countryfree on April 18, 2015, 06:45:17 PM 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.
Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: box0214 on April 19, 2015, 06:06:44 AM 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.
Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: OROBTC on April 19, 2015, 06:47:13 PM ...
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 (http://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... Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: Bizmark13 on April 20, 2015, 05:30:22 AM 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 (http://bitcointalk.org/index.php?topic=325735)) 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 (http://bitcointalk.org/index.php?topic=906682). 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? Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: Kazimir on April 20, 2015, 05:40:50 AM 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. Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: ensurance982 on April 20, 2015, 11:29:10 AM 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.
Title: Re: Blockchain used as a database storage system for records to replace MYSQL? Post by: herzmeister on April 20, 2015, 11:40:27 AM There are storj or maidsafe being built for that kind of scenario
|