
Introduction
Oracle Autonomous Database provides a fully automated, self-securing database service with a wide range of security features, including:
- Always-on Transparent Data Encryption (TDE) to secure your data at rest.
- Automated encrypted backups.
- SQL*Net encryption for client connections.
- Oracle-managed and customer-managed encryption keys.
- Access Control Lists to restrict access to trusted sources only.
- Database Vault to restrict access to application data by privileged users.
- Data Redaction to mask (redact) data returned from queries issued by applications at runtime.
- Label Security to implement multilevel access controls based on data classification.
- Data Safe as a unified control center including sensitive data discovery, evaluating risk, and data masking.
- Database Auditing for selective and effective auditing inside the database using policies and conditions.
- SQL command restrictions to ensure security and reduce human error.
- No access to the operating system and the underlying hardware to ensure security and reduce risk.
- Applying updates and security patches automatically while eliminating manual effort and human error.
- Meeting a broad set of international and industry-specific compliance standards like HIPAA and PCI DSS.
- Dedicated deployments provide the highest isolation running on a dedicated Exadata Infrastructure inside your private network, Container Database level isolation, and customizable operational policies.
- And for sure I missed a few…
On top of this very long list, Oracle Autonomous Database adds crypto-secure data management with Blockchain and Immutable Tables providing an extra level of data protection by allowing new data to be inserted while preventing existing data from being modified or deleted.
Blockchain and immutable tables extend the Oracle Converged Database features, require no application changes, and are fully supported by the high availability, scalability, and disaster recovery technologies like Oracle RAC and Data Guard.
Blockchain and immutable tables were introduced out-of-the-box in Oracle Database 21c and made available in Oracle Database 19.10 (blockchain) and 19.11 (immutable). In October 2021, both table types were supported in Oracle Autonomous Database on Shared Infrastructure, and later in February 2022, released for Autonomous Database on Dedicated Infrastructure.
Immutable Tables
Immutable tables provide a highly tamper-resistant persistence option natively in the Oracle Database by permitting insert-only operations while preventing modifications and restricting deletions. They protect data from illicit modifications by rogue employees or hackers using stolen credentials.
Like any other tables in the Oracle Database, immutable tables are created and accessed with standard and declarative SQL, making them fully transparent to applications. SQL provides additional clauses to control the retention policy for rows and the entire table. In the following example, the rows can never be deleted, while the table itself can only be deleted after 30 days of inactivity.
SQL> CREATE IMMUTABLE TABLE trade_ledger (id NUMBER, luser VARCHAR2(32), value NUMBER)
NO DROP UNTIL 30 DAYS IDLE
NO DELETE LOCKED;
SQL> INSERT INTO trade_ledger VALUES (1, 'Tom', 500);
SQL> INSERT INTO trade_ledger VALUES (2, 'Carol', 600);
SQL> INSERT INTO trade_ledger VALUES (3, 'Steve', 700);
SQL> commit;
SQL> UPDATE trade_ledger SET value = value * 2;
SQL Error: ORA-05715: operation not allowed on the blockchain or immutable table
SQL> DELETE FROM trade_ledger WHERE id = 1;
SQL Error: ORA-05715: operation not allowed on the blockchain or immutable table
SQL> DROP TABLE trade_ledger;
ORA-05723: drop blockchain or immutable table TRADE_LEDGER not allowed
Blockchain Tables
Like immutable tables, blockchain tables are inert-only tables. To further increase tamper-resistance, the rows are chained by storing the previous row’s cryptographic hash in the current row. The hash value of a row is calculated based on the row data and the hash value of the previous row, which enables users to verify any data manipulation were made by hackers using a new security vulnerability or bypassing the database software.

SQL> CREATE BLOCKCHAIN TABLE bank_ledger (id NUMBER, luser VARCHAR2(32), value NUMBER)
NO DROP UNTIL 30 DAYS IDLE
NO DELETE LOCKED
HASHING USING "SHA2_512" VERSION "v1";
SQL> INSERT INTO bank_ledger VALUES (1, 'Tom', 500);
SQL> INSERT INTO bank_ledger VALUES (2, 'Carol', 600);
SQL> INSERT INTO bank_ledger VALUES (3, 'Steve', 700);
SQL> commit;
SQL> UPDATE bank_ledger SET value = value * 2;
SQL Error: ORA-05715: operation not allowed on the blockchain or immutable table
SQL> DELETE FROM bank_ledger WHERE id = 1;
SQL Error: ORA-05715: operation not allowed on the blockchain or immutable table
SQL> DROP TABLE bank_ledger;
ORA-05723: drop blockchain or immutable table BANK_LEDGER not allowed
Blockchain tables contain system-generated hidden columns that you can access by querying the column names in the DBA_TAB_COLS view and adding the hidden column name explicitly to your SELECT statement:
SQL> SELECT column_name, hidden_column FROM dba_tab_cols WHERE table_name = 'BANK_LEDGER';
SQL> SELECT id, luser, value, ORABCTAB_HASH$ FROM bank_ledger;
ID LUSER VALUE ORABCTAB_HASH$
_____ ________ ________ ___________________________________________________________________________________________________________________________________
1 Tom 500 B1149A991C890766FE44BA03C0358D3EDBE1DAB9E2B240583BCF1D72FFAB9887D27E165B9056499977B643121C5738894609FA5289888D7B8CFB867BA782C290
2 Carol 600 14A40DFC8B42CA06077297A200F9558FA65DFB630918DF4B1686A162BE07C62EC1F29D0B461EE29D0CCF365DB34C9ABF58FECF4104896FF85FC9C725C36590E5
3 Steve 700 A438E0ADEDF50A6180F2CB4EEF2C06B38A71F15A7382543854167BE5339CF9C1189B42A89AFF8391AC1C3B887907053DB9CEEC61B81F899929DB3DA87CE66AD4
The content of blockchain tables can be verified to make sure that no modifications have been made to data by bypassing the database layer:
SQL> set serveroutput on
SQL> DECLARE
rows_verified NUMBER;
BEGIN
DBMS_BLOCKCHAIN_TABLE.VERIFY_ROWS(
schema_name => 'ADMIN',
table_name => 'BANK_LEDGER',
number_of_rows_verified => rows_verified
);
DBMS_OUTPUT.PUT_LINE('Number of rows verified: ' || rows_verified);
END;
/
Number of rows verified: 2
Optionally, users can sign the contents of the rows with PKI-based signatures. Signing a row sets a user signature for a previously created row. The cryptographic signing of new data by users provides additional security against tampering and impersonation.
Use Cases and Benefits
Most customers, especially in the financial industry and public sectors, have increased security requirements for their applications driven by their own interest in protecting their data and forced by a central authority and governance regulations. Data that should be protected from modifications include financial transactions, payments, contracts, audit trails, regulatory compliance data, and others. Losing these assets leads to severe consequences like legal exposure and loss of reputation.
Blockchain and immutable tables in the Oracle Database allow applications to achieve higher security and make their data tamper-resistant without adding complexity, adapting a de-centralized model, or even changing existing applications.
Easy To Use
Blockchain and immutable tables are:
- Created and managed by the same well-known standard SQL and PL/SQL operations.
- Like any other regular Oracle Database tables, can participate in transactions, store relational and JSON documents, be indexed and partitioned, joined with other tables, and used as a basis for views.
- Integrated into Oracle Database’s multi-model converged architecture that natively implements JSON, Spatial, Graph, Text, and REST APIs.
- Fully transparent to applications, enabling developers to continue using their current architecture and development paradigms.
- Highly available, scalable, and protected against failure and disaster by Oracle’s leading high availability and disaster recovery solutions.
- No additional infrastructure, software, or licensing is required.
- FREE in all Oracle Database editions.
It is dramatically simple for developers and administrators to use and manage blockchain and immutable tables.
Conclusion
Crypto-secure data management functionality is natively available in the Oracle Database and Oracle Autonomous Database on Shared and Dedicated Infrastructure. Blockchain and immutable tables protect critical data from accidental changes by human error and unauthorized modification or deletion by criminals, hackers, and fraud. Crypto-secure data management is added transparently to applications strengthening data security and reducing application developers’ complexity and effort.
Blockchain technology is not complex anymore but natively integrated and easy to implement in the Oracle Database.
Further Reading
- Why Oracle Implement Blockchain in the Database by Maria Colgan
- Native Blockchain Tables Extend Oracle Database’s Multi-model Converged Architecture by Mark Rakhmilevich
- Security Features in Oracle Autonomous Database
- Blockchain Table in Oracle Database 19.10 and 19.11 – How and what to Consider!
- Managing Blockchain Tables and About Immutable Tables documentation