Can Blockchain Be Queried as a Database?

  • Thread starter Thread starter WWGD
  • Start date Start date
  • Tags Tags
    Database
AI Thread Summary
Blockchain functions as a decentralized database that records transactions, distinguishing itself from traditional centralized databases. It allows querying of data, but modifications can only be made to the current block, not to past blocks. Each participant in the network maintains and updates the database, which relies on consensus mechanisms to validate transactions. While blockchains can provide real-time information and maintain historical records, they are generally slower than centralized databases due to their distributed nature and the computational demands of cryptography. Overall, blockchain technology is suited for specific applications but not universally applicable like traditional databases.
WWGD
Science Advisor
Homework Helper
Messages
7,678
Reaction score
12,344
Hi All,
Just curious: If blockchain is a database.
Can it be queried? I don't know how key-value systems are queried.
How are blocks added?
I guess if it is a DB, it is not modifiable
 
Technology news on Phys.org
Caveat: I don't know anything about blockchains, Bitcoin, or other crypto-currencies. I'll respond to the question you asked, which might not be what you're really asking.
WWGD said:
I don't know how key-value systems are queried.
A dictionary (in Python parlance) or map (in C++ parlance) is a data structure consisting of key-value pairs. You can access (for read or write) a value by using its key, similar to the way you access an element of an array by using its index in the array. One difference is that for an array, the indexes have to be integral values; for a dictionary/map, the keys can be strings or numbers, or other types.
 
  • Like
Likes WWGD
Another term is associative array.
 
WWGD said:
Hi All,
Just curious: If blockchain is a database.

I am not a blockchain user but I know some things about it.
Blockchain technology creates a distributed database and the difference between it and a traditional database is that it is not centralized as the latter i.e. it is not based on the classical client - server model, where the client can among other things - where "things" means the CRUD operations, change entries that are stored in some server on the net i.e on some centralized resource. In blockchain technology each participant maintains, calculates and updates new entries into the database in the form of records. Blockchain is a combination and orchestration of three technologies: Internet (specifically P2P network form), cryptography (private key) and a protocol.
As it is decentralized it is appropriate for some specific functions but not for all. Centralized databases are appropriate for other.

One notable thing about blockchains is that they can provide real time information but they can also hold their own history and expand. They are not as fast as a centralized traditional database and this is mostly due to the fact that are based on distributed networks that do not share processing power so each one must process and then compare to the rest of the whole network in order some "consensus" of what has happened to be reached. Also, hiding information using some form of cryptography poses a serious computational burden for the machines on the network.
 
  • Like
Likes FactChecker and WWGD
WWGD said:
Hi All,
Just curious: If blockchain is a database.
Can it be queried? I don't know how key-value systems are queried.
How are blocks added?
I guess if it is a DB, it is not modifiable

There are a variety of blockchain technologies out there. Very generally:

A blockchain is a database that records transactions. You can query a blockchain but you cannot modify blocks other than the current block. Validated transactions are written to the current block and when the current block reaches a set size, a new block becomes the current block.
 
  • Like
Likes WWGD
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top