alphaspirit - Fotolia

NewSQL databases: The bridge between SQL and NoSQL

NewSQL databases attempt to provide enterprises with the top benefits of both relational and NoSQL databases on one platform. Here's a look at how NewSQL can benefit enterprises.

The database product landscape no longer consists of a handful of relational database management system offerings. Database product consumers can choose from dozens of competing offerings, ranging from purpose-built database management system platforms that focus on meeting a unique set of application requirements to general-purpose systems with much wider scope of application.

For those tasked with the responsibility of choosing the most appropriate database platform for a given application, this seemingly endless array of DBMS offerings can easily become bewildering.

One class of database products garnering an increasing amount of interest from the IT community is NewSQL. Although NewSQL doesn't receive as much attention as its NoSQL counterpart, there are a growing number of IT shops implementing these platforms to address a specific business use case.

Meeting the unique needs of OLTP applications

NewSQL databases provide a solution for applications that require highly scalable, online transaction processing (OLTP) platforms by combining the ACID guarantees of SQL-based relational database engines with the horizontal scalability of NoSQL systems.

An example of an OLTP application would be a brick-and-mortar retail checkout process. As the cashier scans the products, the system accesses the database to retrieve the product descriptions and prices, record the customer purchase and update inventory counts. The transactions are short, and the updates must be applied to the database as quickly as possible.

The key requirements for OLTP applications are platform availability and performance, the ability to support large volumes of concurrent users and permanently store incoming data changes as quickly as possible for safekeeping.

In a nutshell, most OLTP applications need to use databases that adhere to traditional ACID principles:

  • Atomicity. All data modifications within a single transaction either succeed or fail as a unit of work. The system does not permit partial updates from a single transaction.
  • Consistency. All data in the database is in a consistent state. Although transactions may alter the contents of the database, all of those modifications are valid.
  • Isolation. Concurrent transactions executed simultaneously do not interfere with each other. The system makes transactions executing contentious data updates appear to run sequentially.
  • Durability. Data committed by transactions is permanent and protected from application and database failures. The system provides recoverability mechanisms to ensure all committed data is permanent and all noncommitted updates that occurred during the point of failure are backed up.

NoSQL scalability

The need to store unstructured data in conjunction with the ability to provide almost absurdly high degrees of scalability, data distribution and availability were the business drivers behind the genesis of NoSQL offerings. Many initial NoSQL products were specifically designed to utilize low-cost hardware to store semistructured and unstructured data and provide extremely high horizontal scalability and data redundancy at an affordable price point.

Instead of the more traditional approach of increasing capacity by opening up the database server chassis to add CPU, memory and disks or migrating the database to a hardware platform that has more resources, NoSQL architectures provide administrators with the ability to easily scale the system horizontally by adding additional nodes into the environment.

One of the more common mechanisms NoSQL platforms use to provide scalability is sharding, which partitions data into separate storage constructs. NoSQL platforms group data based on a user-defined or system-generated key and assign the responsibility of interacting with data partitions to different nodes in a cluster.

While relational database clustering has been available from industry heavyweights for years, it is costly and complex to administer. But data consistency is a major issue when database administrators attempt to scale any DBMS horizontally. One of the benefits of NoSQL architectures is easy horizontal scalability. But horizontal scalability often comes at the expense of data consistency.

To achieve maximum availability and scalability, NoSQL clusters can't always guarantee the consistency of replicated data across all nodes at write time. The issue occurs when a network failure prevents the nodes in a cluster from communicating. Although all nodes are accessible, the data they contain may not be consistent because the network failure is preventing the latest data updates from being applied to all nodes.

Although some offerings provide different configuration options, most NoSQL architectures provide horizontal scalability and eventual consistency of data across the nodes in the cluster. The system will present the most recent version of the data, even if it is unable to guarantee its consistency on all nodes. This may be permissible for some applications. But it isn't an optimal solution for other implementations, such as financial transactions.

NewSQL offerings

NewSQL databases attempt to combine the data consistency benefits of traditional relational databases with the scalability of NoSQL platforms.

Like their NoSQL counterparts, NewSQL databases vary widely in architecture, features and functionality. Here are a couple of examples to help you learn more about the available offerings.

It's important to note that this is a small subset of products, with each offering providing different implementations of ACID compliance and scalability. Like any product comparison, you'll need to perform a thorough evaluation of the competitors to ensure the selected platform meets your needs.

Google Cloud Spanner. Google describes Cloud Spanner as "the only enterprise-grade, globally distributed and strongly consistent database service built for the cloud specifically to combine the benefits of relational database structure with non-relational horizontal scale." Cloud Spanner allows SQL querying and no limits on scale. The distributed database is also ACID-compliant. It is known for its ability to provide availability and consistency without sacrificing either. Here's a link to the product features.

CockroachDB. Although it may not be the most endearing product name, many industry experts include CockroachDB in their lists of leading NewSQL products. CockroachDB provides ACID-compliant transactions, automatic sharding and a globally scalable architecture. Here's a list of Cockroach DB features.

NuoDB. NuoDB is a popular NewSQL product that offers a distributed database architecture based on its own, SQL-based ACID-compliant DBMS engine. NuoDB's website includes a page that provides a well-thought-out decision tree that will help you choose a DB product based on application needs.

VoltDB. Another NewSQL competitor is VoltDB. VoltDB is an ACID-compliant, shared-nothing, in-memory database cluster. It's shared-nothing architecture means it runs in memory across clusters to enable large scalability levels. VoltDB is known for its speedy throughput and was designed to avoid most of the operations that can drive processing overhead in most relational databases.

Dig Deeper on Database management