What is this Quantum Ledger Database That We Keep Hearing About?
By: Salman Dabbakuti
Tags: Cloud Computing, Blockchain, AWS, Programming, Database

Image Source: Aneesh Nair

Quantum Ledger Database(QLDB) is a No-SQL(Semi-SQL & Semi-NoSQL) Append-only database that provides an immutable, transparent, and cryptographically verifiable transaction log ‎owned by a central authority. Since it is a No-SQL database, It has the ability to store a lot of semi-unstructured data using a document-oriented data model. Moreover, it Uses SQL like data structure(Tables and Rows) and a language(PartiQL). So, it can leverage current SQL developers to offer robust ways to query and manage data.

QLDB vs SQL,NoSQL Databases:

Traditional Databases:

Any other traditional databases (SQL and No-SQL) store data in the form of a table or JSON document model. Within these traditional databases, data can be modified by anyone who is in control of the database itself results in data conflicts and manipulations. These databases don't keep track of document history and only store the current state of the document. So, these databases cannot provide audit trials out of the box. As all of these databases do not have automatic data encryption so the data files are at risk of being read or modified by hackers directly. While most of these databases cannot work with cryptography, so it is not possible to immute the data and cannot prove who modified what.

Immutability&Transparency ✘ Audit Logs ✘ Verifiable ✘ Data History ✘

Amazon’s QLDB:

Amazon QLDB is a fully managed ledger database that provides a transparent, immutable, and cryptographically verifiable transaction log ‎owned by a central trusted authority. Amazon QLDB tracks each and every application data change and maintains a complete and verifiable history of changes over time. How did you write this definition soo beautifully and clearly? Because I copied it from AWS Documentation. That is the best definition I’ve come across for QLDB.

AWS is always at the front when it comes to blockchain technology or any technology in general. Amazon, itself being a giant knows the importance of data among the businesses. It introduced QLDB in 2018 along with Amazon Managed Blockchain.

Features of QLDB:

So, you may ask, why Amazon QLDB?

Immutability&Transparency ✓

Amazon QLDB has a built-in immutable journal that stores an accurate and sequenced entry of every data change. The journal is append-only, meaning that data can only be added to a journal and it cannot be overwritten or deleted. This ensures that your stored change history cannot be deleted or modified. Even if you delete the data from your ledger, the change history of that data can still be accessed by reading from the immutable journal.

2. Audit Logs & History✓

With Amazon QLDB, you can access the entire change history of your application’s data. You can query a summary of historical changes, and also specific details related to transaction history. So, QLDB can provide Audit trails out of the box without any further implementation.

3. Verifiable✓

Amazon QLDB uses cryptography to create a concise summary of your change in history. This secure summary, commonly known as a digest, is generated using a cryptographic hash function (SHA-256). The digest acts as proof of your data’s change history, allowing you to look back and verify the integrity of your data changes.

4. Highly Scalable✓

With Amazon QLDB, you don’t have to worry about provisioning capacity or configuring read and write limits. You create a ledger, define your tables, and QLDB automatically scales to support the demands of your application. QLDB also allows you to monitor operational metrics for your read and write IOs with Cloudwatch.

Architecture of QLDB Application:

QLDB Application Architecture

QLDB vs Blockchain:

If you’re familiar with blockchain already, you might conclude from the definition, QLDB is somewhat related to blockchain. yes, it is. It offers all the key features of a blockchain ledger database including immutability, transparency, and cryptographically verifiable transaction log. However, there’s the most important difference between QLDB and Blockchain is — QLDB is a centralized ledger whereas Blockchain is a distributed ledger.

Blockchain has shown the potential to change every sector out there. Also, blockchain is equally useful when it comes to storing data. After all, it is a distributed ledger. Also, the fact that traditional databases will soon make its way out for the more robust blockchain-based database. However, some businesses just cannot use a decentralized database for their business as they have to run a number of blockchain nodes and a lot of complexity involved in order to build a blockchain network. Also, other organizations that are involved with the business consortium should need to participate in the network.

There are certain use-cases where an organization(like a bank) doesn’t want to share ledger with any other party and wanted keep track of data on centralized ledger where they want data to be immutable, verifiable, and secure. This type of use-cases don’t need the complexity of Blockchain network architecture and QLDB is a perfect fit.

Is QLDB going to kill Blockchain? The answer is No. Blockchains have their own unique features — i.e. Smart contracts that run on the blockchain network take application logic to the next level by running separately from the server. wherein QLDB(or any traditional databases), you will end up writing application logic in your server code.

Image Source: Chirag dhul

“QLDB is a centralized ledger-based database powered by blockchain”

With the invention of QLDB and ProvenDB(Story for another), I believe we are on the right path to offering enterprises a way to take advantage of a ledger like technology without the complexities.

Selection of Database Technology:

Applications of QLDB:

QLDB fits perfectly for applications that need a scalable centralized ledger database where it needs to record all the transaction history overtime with added cryptographic security.

Blockchain can be applied to many challenges of the supply chains, finance, healthcare such as complicated record-keeping and tracking of products. As a less corruptible and better-automated alternative to centralized databases. However, few industries often don’t want to share ledger with other participants(as in blockchain) so they don’t want to use complex blockchain architecture of network with channels for the privacy instead they can use QLDB.

Usecases:

Banking and Finance:

Banks often need a centralized ledger-like application to keep track of critical data, such as credit and debit transactions across customer bank accounts. Instead of building a custom database that has complex auditing functionality, or using blockchain, banks can use QLDB to easily store an accurate and complete record of all financial transactions.

2. Supply chains:

Manufacturing companies often need to track the full manufacturing history of a product as well as records of their movements throughout the supply chain, A ledger database can be used to record the history of each transaction, and provide details of every individual batch of the product manufactured at a facility. In case of a product recall, manufacturers can use QLDB to easily trace the history of the entire production and distribution lifecycle of a product.

4. Insurance:

Insurance applications often need a way to better track the history of claim transactions. Instead of building complex auditing functionality using relational databases, insurance companies can use QLDB to accurately maintain the history of claims over their entire lifetime, and whenever a potential conflict arises, QLDB can also help cryptographically verify the integrity of the claims data, making the application resilient against data entry errors and manipulation.

In the next article, let’s dive deep into QLDB Setup, and testing out a sample application on top of QLDB. Are you guys interested? Follow us!!.

Work with us!

Impressed with the features and use-cases of QLDB? Wanted to power your application or project with QLDB? Let us know. We at Devopsinternational (an emerging technologies company focussed on Machine learning, Blockchain, and AWS) delivering value to customers and society with software craftsmanship. We have been helping social and environmental startups validate their idea through its product development and technology expertise. You can find more about our services on our website.