On Couchbase Server 7. Q&A with Chin-Heng Hong
“Customers no longer need both a relational database and a NoSQL database.“
Q1. You have recently announced the general availability of Couchbase Server 7. What is in this release?
With the general availability of Couchbase Server 7, we now support the requirements of a new generation of modern applications. Now there’s no need to choose between relational versus NoSQL databases. With over 30 major features that enable enterprises to easily escape the confines of slow-performing, rigid applications that are powered by aging relational databases, this landmark release bridges the best aspects of relational databases with the flexibility of a modern database. As a result, enterprises can now confidently accelerate their strategic initiatives such as moving business-critical applications into the cloud more quickly, improving application flexibility and increasing developer agility and scale. Enterprise development teams now also have one unified platform so there is no longer a need to use one database for transactions and another for developer agility and scale. This means that customers can simplify their database architectures, expand Couchbase usage into enterprise transactional applications and reduce operating costs through performance enhancements.
Q2. Let’s look in some details on how do you bridge the best aspects of relational databases like ACID transactions with the flexibility of non-relational databases, such as NoSQL databases?
In Couchbase Server 7, we’ve extended the best aspects of relational databases with the flexibility of modern databases. In this release, we’ve eliminated the complexities of database sprawl by adding full mature SQL transaction capabilities. This means customers no longer need both a relational database and a NoSQL database. Couchbase Server 7 also offers multi-statement SQL transactions on a flexible-schema document database – providing the familiarity of relational databases on a NoSQL system. For the first time, customers can do multi-document SQL ACID transactions with interactions in microseconds all within one unified database platform.
Other key functionality in Couchbase Server 7 that bridges the best aspects of relational databases with the flexibility of modern databases include:
- The introduction of schema and table-like organizing structures called “Scopes and Collections,” within the schemaless database. Scopes and Collections allow logical isolation of different types of data, independent lifecycle management and security control at multiple levels of granularity. Application developers can use them to organize and isolate their data, while DevOps and admins find the multiple levels of role-based access control (RBAC) a powerful option to host microservices and tenants at scale.
- Faster operational performance that lowers the total cost of ownership (TCO) facilitated by collection-level processing of data access, partitioning and index isolation. Couchbase Server 7 also adds a configurable backup service. Data sets delivered to microservices are faster, index builds execute in parallel and indexes are portable during data rebalancing. And finally, the query service adds a cost-based query optimizer to replace its former rules-based optimization.
Q3. According to Forrester, “Many organizations still use applications based on legacy fourth-generation languages and database management systems and other legacy technologies that haunt them to this day.” How do you help such organizations?
There is an urgent need for a database platform that can support both developing and deploying new applications and also modernizing and upgrading existing ones. With the release of Couchbase Server 7, we’ve eliminated the key friction points that have kept enterprises from modernizing their relational-based applications, which in turn gives them the agility and flexibility needed to accelerate the development of modern business-critical applications.
Additionally, our customers benefit in many ways, including the ability to execute business transactions within their customer-facing applications, develop rich customer 360 data models and applications that drive personalization and execute long standing plans to modernize relational-based applications to the cloud.
Q4. What is required for development teams to make the transition from legacy relational databases to Couchbase’s database?
The transition is easy because development teams can make the transition from legacy relational databases to Couchbase’s modern database without needing to re-train team members as the platform supports the programming languages many already use, combined with the familiarity of SQL that they already know.
Couchbase also hides the complexity of a scale-out database with auto partitioning of data across server nodes, auto rebalancing of data when a server node is added or removed, auto-failover when a server node crashes, and built-in active-active replication to support globally distributed clusters for high availability and disaster recovery.
Q5. When is the use of SQL still appropriate and when not?
NoSQL databases were developed to address the challenges of scaling out legacy relational databases to support a large number of users and real-time interactions in modern web, mobile and IoT applications (24×7, globally). Most NoSQL databases do not support SQL as the query language and force users to make the unnecessary tradeoffs between a powerful query language against the highly available, highly scalable NoSQL database. Couchbase took a different approach to extend SQL to support the JSON document model, thus combining the power of SQL with the flexibility of JSON, on a highly available, highly scalable database. This enables an easier migration for enterprises from legacy relational databases to the modern Couchbase database.
Q6. Couchbase offers multi-statement SQL transactions. What are these and what are they useful for?
Couchbase 7.0 provides support for multi-document ACID transactions for its distributed database platform that scales horizontally to provide high availability. It supports the familiar SQL constructs for transactions such as START TRANSACTION, SET SAVEPOINT, ROLLBACK and COMMIT. Within a transaction, users can issue one to more SQL Data Manipulation Language (DML) statements, similar to what they do with relational databases. Couchbase will guarantee that the changes within a transaction are atomic, and not visible to other users until the transaction commits. Any partial updates by an aborted transaction will be rolled back automatically.
As a distributed scale-out data platform, Couchbase has a long-standing distinction of being a leader in scalability, performance and high availability. With multi-document distributed transactions, we remain true to those tenets. We’re not introducing any global schedulers or global coordination, and don’t rely on finely tuned time servers. Historically, transactions were implemented using a 2PC. In a distributed scale-out database, 2PC is too slow, induces distributed deadlocks and most importantly introduces SPOF (Single Point of Failure). By using our smart clients, we avoid the need for a single transaction monitor or distributed lock manager. Because our distributed smart clients are aware of the transaction state, this eliminates the availability and scalability limitations of a centrally managed 2PC protocol.
With the release of Couchbase Server 7, customers can mix multi-document SQL ACID transactions with low-latency interactions in microseconds all within one unified database platform.
Q7. You use a so call dynamic data containment model. What is it?
The Dynamic Data Containment Model adds multiple logical organization layers called scopes and collections within the dynamic schema database. The new scopes and collections dynamic data containment model simplifies application modernization by removing the mystery of migrating from relational to non-relational database systems. This allows enterprises to develop rich customer 360 data models that drive personalization at the edge. In the immediate term, you can now bolster distressed legacy RDBMS systems with high-performance caching, and in the long term, you can refactor and migrate your data structures as JSON documents.
Q8.How do you combine the rigidity of SQL-schemas within a Dynamic Schema database?
When it came to developing the Couchbase 7.0 release, it wasn’t an easy proposition bringing that relational calculus and programming simplicity to a flexible-schema database. It’s been a six-year journey. We all know there is no such thing as a schema-less application. The difference with NoSQL is that the database doesn’t impose its own schema (data model) over and beyond the schema (object model) imposed and implied by the application.
Couchbase supports JSON as the data model as JSON is widely used in modern web, mobile and IoT applications for structured and semi-structured data. Couchbase allows applications to evolve their data without the need to define the schema beforehand, giving the applications the agility they need to rapidly evolve their data to meet changing user requirements.
JSON document model is a superset of the relational model, and we have proven that one can extend the powerful SQL language to support a dynamic JSON data model, retaining the power of a comprehensive and declarative query language, and combining it with the flexibility of the dynamic JSON data model.
Chin-Heng Hong is VP Product Management at Couchbase, the modern database for enterprise applications. A senior engineering executive with more than 25 years of experience, Hong previously held roles at Hewlett Packard, Oracle, Siebel Systems and others.
Sponsored by Couchbase.