Stack Overflow Asked by user3848207 on November 12, 2021
Blockchain has been described as a form of database. So far, most blockchain applications seem to involve blockchain as a one-table database.
Is it possible to create a data schema with multiple tables, one-to-many relationship like a relational database on blockchain? If not, why?
Using the blockchain structure directly? No. However, a blockchain ledger serves very similar purposes as a write-ahead logging (WAL). Quoting from wikipedia: "a family of techniques for providing atomicity and durability (two of the ACID properties) in database systems".
WALs and distributed ledgers are just ways of registering a sequential set of events, where order matters. The main difference is that a WAL does not contain the whole history of events.
The way you construct SQL or any other type of database over blockchain, is by using the ledger as a WAL for SQL instructions. Since the ledger contains the whole history of events, you can always reconstruct the SQL database by executing the history in the same order.
Answered by shumy on November 12, 2021
If I understand your question, you're asking, "can I treat a blockchain just like a normal relational database, and execute queries?" I assume you basically want a database, with the benefits of "immutability" and decentralization. Technically, the answer is yes, but economically and practically, there are a few things to consider.
Blockchain was invented as a solution to decentralized consensus, and cannot really be taken out of the context it was invented in, which requires not only a technical implementation, but an economic incentive for usage.
Answered by JBaczuk on November 12, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP