Fundamentals of database sytems
Use of Blockchain as Distributed Database
A Climate Example
Frequent Outages / Delays
Frequent Outages / Delays
“Please note: NCEI is experiencing an Archive Information Request System (AIRS) outage. We are working to resolve the issue as soon as possible.”
Integrated Global Radiosdone Archive
“Due to browser FTP deprecation, users will no longer be able to access NCEI data via browser FTP clients.”
Reasons
- Lack of funding to NOAA and government agencies
- Internal complexity of digital archives
- Large file sizes (GB and TB per dataset request)
- Outdated data dissemination (FTP, etc)
- Centralized server locations
What is Blockchain?
It’s a protocol that verifies a block of data by the hash of its contents
Public blockchains (particularly cryptocurrencies) normally have a time element
Block #1 … # 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048
Block #2 (a few minutes later)… # 000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd
Simplest cryptocurrencies only keep track of user balances.
Other blockchains have nothing to do with currency and simply are distributed databases (Hyperledger)
Others are a combination of the two, where they store both user balances and other data (eosio).
Example of Distributed Database
Amazon SimpleDB
- NoSQL - “manages multiple geographically distributed replicas of your data automatically”
- “With Amazon SimpleDB, you can focus on application development without worrying about infrastructure provisioning, high availability, software maintenance, schema and index management, or performance tuning.”
Blockchain = Distributed Database
Instead of data residing on 1 server, structured data resides on tens, hundreds, or even thousands of servers
Benefits:
- Resiliency. Attack 1 server, the other nodes still keep the network functional - Geography. Can communicate with a node within your own country/location - Security. Account is tied to an asymmetric public key.
Pitfalls:
- Data throughput. Since all nodes need to host data simultaneously, there is latency and cap to amount of information that be shared at all times
- Sea of different “protocols” (blockchain-specific language vs SQL)
Blockchain vs Traditional Database
SQL Database Eosio Blockchain
Type Relational Key-value pair
Table Transparency Only as authorized All data public
User ability to modify Only as authorized Only as authorized
Security Symmetric encryption (company keeps a copy of your secret key)
No private key is stored
Why Blocks?
View computer as a real-time operating system.
Example: Object Computing with DDS
A block is a clump of data that is valid for a certain time interval that the network accepts as valid.
Across a network, it’s much easier to verify a single signature with a bunch of underlying transactions than a large number of transactions, each with their own signature.
Smart Contracts <> Data Table Updates
Smart contracts are instructions for how to make automatic updates to data “tables” inherent in the blockchain.
Examples:
- Bitcoin simply updates the currency balances of relevant parties - Ethereum commonly allows creation of new assets (ERC20 tokens), NFTs,
DeFi contracts - With eosio blockchains, they are used to insert and/or update data table
entries
Thank You!