An overview of blockchain fundamentals, including examples of Oracle 20c Blockchain Tables. Includes concepts of trust, immutability, hashes, distributed nodes, and cryptography.
2. Karen Lopez
• Karen has 20+ years of
data and information
architecture experience
on large, multi-project
programs.
• She is a frequent speaker
on data modeling, data-
driven methodologies and
pattern data models.
• She wants you to love
your data.
3. ABSTRACT
With all the hype around blockchain, why should a data architect or
other data professional care? In this session, we will cover the basics
of blockchain as it applies to data and database processes:
Immutability
Verification
Distribution
Cryptography
Transactions
Trust
We will look at current offerings for blockchain features in Azure
and in database and data stores. Finally, we'll help you identify the
types of business requirements that need blockchain technologies.
You will learn:
Understand the valid uses of blockchain approaches in
databases
How current technologies support blockchain approaches
Understand the costs, benefits, and risks of blockchain
Blockchain for the DBA and
Data professional: Basics of
Blockchain
4. WHY THIS TOPIC?
I was asked to give a primer on
Blockchain
Buzz
More focus on data uses
Better understanding of uses
I own a blockchain skirt
5. WHY DBAS AND DATA PROFESSIONALS
Concepts
Business implementations
Database technologies
10. TRANSACTIONS
“It’s basically the
same thing as a
database
transaction”
Not changeable
Must be offset with another transaction
Consensus is reached when 51% of the nodes agree
transaction is valid
Recorded in all nodes
11. NODES
Distributed Ledgers
Transactions are recorded in all
nodes. Instead of one ledger, there
are many ledgers to maintain trust
Nodes are:
Distributed, multiply-owned nodes
Based on P2P architectures
No central owner or manager:
Consensus-based
12. BLOCK
One transaction of data
Data about transaction
#1 {data} #2 {data} #1 #3 {data} #2
Hash of data Hash from previous block
13. ADD BLOCK PROCESS
Here’s a
Transaction1
Send
Transaction
to all nodes2 Validate
Transaction3 Add to
blockchain4
…
Nodes
14. TRUST
To manipulate the data,
one would need to
change all (or 51%) the
copies of the data, which
are managed by different
people.
…and do so at exactly the
same time
15. HISTORY – THE CHAIN
Everyone sees
Where the asset was previously
in the chain
When some transaction about
the asset was done
Every previous state of an asset
in the chain
16. TRUST EVERYONE, BUT ALWAYS CUT THE DECK
Blockchain does not
validate the truthfulness of
the transaction that is put
into the chain
17. TRIGGERS
An action that happens after a
transaction
Delivery
Penalty
Payment
…anything
18. LEDGERS
Traditional
Each org has own ledger
Managed by one entity
Audited
Requires constant reconciliation
Sometimes not secure
May be encrypted
Blockchain
Multiple copies
Managed by multiple entities
Transparent
Trustable
Encrypted
20. NATIVE BLOCKCHAIN TABLES
Oracle Blockchain Tables
Focuses on Tamper Resistance
Insert only
Not distributed
Not visible to others
Still centralized management
Features
PKI signatures: impersonation resistance
Encryption
Trust but Verify: copies hashes and data
to an external data store
Performance: no consensus required, no
extra infrastructure
CREATE Blockchain Table Trade_Ledger;
21. ORACLE BLOCKCHAIN TABLE
Transaction of data in a Blockchain Table as a row
Data about transaction in Blockchain Table as
columns
#1 {data} #0 #2 {data} #1 #3 {data} #2
Hash of data Hash from previous block
Audit Log of hashes and PKI Signatures
23. ORACLE BLOCKCHAIN TABLE
NO DROP
NO DROP UNTIL n DAYS IDLE
NO DELETE
NO DELETE UNTIL n DAYS AFTER INSERT [LOCKED]
DBMS_BLOCKCHAIN_TABLE.VERIFY_ROWS
24. ORACLE BLOCKCHAIN TABLE CREATE
CREATE BLOCKCHAIN TABLE bctab_part
(trans_id number primary key, sender varchar2(50), recipient varchar2(50),
trans_date DATE, amount number)
NO DROP UNTIL 16 DAYS IDLE
NO DELETE UNTIL 25 DAYS AFTER INSERT
HASHING USING "SHA2_512" VERSION "v1"
PARTITION BY RANGE(trans_date)
(PARTITION p1 VALUES LESS THAN (TO_DATE('30-09-2019','dd-mm-yyyy')),
PARTITION p2 VALUES LESS THAN (TO_DATE('31-12-2019','dd-mm-yyyy')),
PARTITION p3 VALUES LESS THAN (TO_DATE('31-03-2020','dd-mm-yyyy')),
PARTITION p4 VALUES LESS THAN (TO_DATE('30-06-2020','dd-mm-yyyy'))
);
25. RESTRICTIONS ORACLE BLOCKCHAIN TABLE
Updating and merging rows
Adding, dropping, and renaming columns
Truncating the blockchain table
Dropping partitions
Defining BEFORE ROW triggers that fire for update operations (other triggers are allowed)
Direct-path loading
Inserting data using parallel DML
Converting a regular table to a blockchain table or vice versa
XA transactions
https://docs.oracle.com/en/database/oracle/oracle-database/20/admin/managing-tables.html
26. WHY WOULD ONE
USE A BLOCKCHAIN
TABLE?
More trustworthy
More protection from
DBA/SysAdmin tampering
Don’t need or want full blockchain
functionality
30. BLOCKCHAIN & COIN FLUFF
“Blockchain is free, so it will put every business that
charges a small fee out of business”
Credit card merchants
Banks
Music labels
Amazon
Travel agencies
Travel providers
Stock exchanges
….
32. BLOCKCHAIN IN REAL LIFE
Supply Chain
Inventory
Transportation
Healthcare
Utilities
Financial
33. BLOCKCHAIN IN
REAL LIFE
Large Global Retailer’s
Canadian operations
Track deliveries
Verify transactions
Automate payments
500,000 loads of inventory
853 million cases of merchandise
Significant cost savings
Faster payments
34. 2019 STATS
From IDC
Total spending 2.9 billion on
blockchain
That’s an increase of 89% from
2018
Predicted to reach 12.4 billion by
2022
35. OTHER INTERESTING
STATS
Bitcoin miners are paid to provide
consensus on transactions
In 2017, miners used more energy that
all of New Zealand
In 2010 an early Bitcoin user bought
two pizzas for 10,000 Bitcoin
These are about Bitcoin, but
they are interesting factiods
36. WHAT DOES THIS MEAN
TO A DATA
MODELER/ARCHITECT?
Support for RDBMS new features are required in our
data modeling tools
Understanding when to use Blockchain and when to
use traditional logging/accounting tables mandatory
Understanding the difference between
Ledger/Blockchain tables and traditional Blockchain
services required