Level: Intermediate
Karen Lopez
Data Evangelist, InfoAdvisors
@DataChick
Blockchain for the DBA and Data Professional
BASICS OF BLOCKCHAIN
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.
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
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
WHY DBAS AND DATA PROFESSIONALS
Concepts
Business implementations
Database technologies
DO YOU
BLOCKCHAIN?
Use it personally?
Involved in professional use?
Rich from your bitcoin?
BLOCKCHAIN BASICS
A NO FLUFF REVIEW
BLOCKCHAIN BACKGROUND
TECH DEVELOPED BY
AN ANONYMOUS
PERSON
ORIGINALLY FOR
COIN
LOTS OF BUZZ
LOTS OF WORDS LOTS OF HATE LOTS OF GOOD USES
BLOCKCHAIN FUNDAMENTALS
TIMESTAMPED
TRANSACTIONS
IMMUTABILITY DISTRIBUTED, MULTIPLY-
OWNED NODES
EACH NODE HAS BLOCKS
CHAINED TO OTHERS
CRYPTOGRAPHIC HASHES
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
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
BLOCK
One transaction of data
Data about transaction
#1 {data} #2 {data} #1 #3 {data} #2
Hash of data Hash from previous block
ADD BLOCK PROCESS
Here’s a
Transaction1
Send
Transaction
to all nodes2 Validate
Transaction3 Add to
blockchain4
…
Nodes
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
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
TRUST EVERYONE, BUT ALWAYS CUT THE DECK
Blockchain does not
validate the truthfulness of
the transaction that is put
into the chain
TRIGGERS
An action that happens after a
transaction
 Delivery
 Penalty
 Payment
 …anything
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
BLOCKCHAIN IN DATABASES
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;
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
https://docs.oracle.com/en/database/oracle/oracle-database/20/admin/managing-tables.html
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
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'))
);
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
WHY WOULD ONE
USE A BLOCKCHAIN
TABLE?
More trustworthy
More protection from
DBA/SysAdmin tampering
Don’t need or want full blockchain
functionality
BENEFITS OF BLOCKCHAIN
SHORTER PROCESSING
TIMES
LOWER COSTS LESS OF CERTAIN RISKS IT’S BUZZWORTHY 
BLOCKCHAIN FLUFF
BLOCKCHAIN FLUFF
“Blockchain is about
Bitcoin and hiding
illegal acts”
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
 ….
BLOCKCHAIN IRL
BLOCKCHAIN IN REAL LIFE
Supply Chain
Inventory
Transportation
Healthcare
Utilities
Financial
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
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
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
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
EVENT – RECOMMENDED FOR LOW-FLUFF
Women on the Block
www.womenontheblock.io
39
KAREN
LOPEZ
DataModel.co
m

Blockchain for the DBA and Data Professional

  • 1.
    Level: Intermediate Karen Lopez DataEvangelist, InfoAdvisors @DataChick Blockchain for the DBA and Data Professional BASICS OF BLOCKCHAIN
  • 2.
    Karen Lopez • Karenhas 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 thehype 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? Iwas 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 ANDDATA PROFESSIONALS Concepts Business implementations Database technologies
  • 6.
    DO YOU BLOCKCHAIN? Use itpersonally? Involved in professional use? Rich from your bitcoin?
  • 7.
  • 8.
    BLOCKCHAIN BACKGROUND TECH DEVELOPEDBY AN ANONYMOUS PERSON ORIGINALLY FOR COIN LOTS OF BUZZ LOTS OF WORDS LOTS OF HATE LOTS OF GOOD USES
  • 9.
    BLOCKCHAIN FUNDAMENTALS TIMESTAMPED TRANSACTIONS IMMUTABILITY DISTRIBUTED,MULTIPLY- OWNED NODES EACH NODE HAS BLOCKS CHAINED TO OTHERS CRYPTOGRAPHIC HASHES
  • 10.
    TRANSACTIONS “It’s basically the samething 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 arerecorded 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 ofdata Data about transaction #1 {data} #2 {data} #1 #3 {data} #2 Hash of data Hash from previous block
  • 13.
    ADD BLOCK PROCESS Here’sa Transaction1 Send Transaction to all nodes2 Validate Transaction3 Add to blockchain4 … Nodes
  • 14.
    TRUST To manipulate thedata, 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 – THECHAIN 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, BUTALWAYS CUT THE DECK Blockchain does not validate the truthfulness of the transaction that is put into the chain
  • 17.
    TRIGGERS An action thathappens after a transaction  Delivery  Penalty  Payment  …anything
  • 18.
    LEDGERS Traditional  Each orghas 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
  • 19.
  • 20.
    NATIVE BLOCKCHAIN TABLES OracleBlockchain 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 Transactionof 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
  • 22.
  • 23.
    ORACLE BLOCKCHAIN TABLE NODROP NO DROP UNTIL n DAYS IDLE NO DELETE NO DELETE UNTIL n DAYS AFTER INSERT [LOCKED] DBMS_BLOCKCHAIN_TABLE.VERIFY_ROWS
  • 24.
    ORACLE BLOCKCHAIN TABLECREATE 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 BLOCKCHAINTABLE  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 USEA BLOCKCHAIN TABLE? More trustworthy More protection from DBA/SysAdmin tampering Don’t need or want full blockchain functionality
  • 27.
    BENEFITS OF BLOCKCHAIN SHORTERPROCESSING TIMES LOWER COSTS LESS OF CERTAIN RISKS IT’S BUZZWORTHY 
  • 28.
  • 29.
    BLOCKCHAIN FLUFF “Blockchain isabout Bitcoin and hiding illegal acts”
  • 30.
    BLOCKCHAIN & COINFLUFF “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  ….
  • 31.
  • 32.
    BLOCKCHAIN IN REALLIFE Supply Chain Inventory Transportation Healthcare Utilities Financial
  • 33.
    BLOCKCHAIN IN REAL LIFE LargeGlobal 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 Totalspending 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  Bitcoinminers 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 THISMEAN 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
  • 37.
    EVENT – RECOMMENDEDFOR LOW-FLUFF Women on the Block www.womenontheblock.io
  • 38.
  • 39.