This article is more than 1 year old
NoSQL Couchbase launches schema-like features to take on the transactional databases of the relational world
Doing both in one system might be 'somewhat elegant' but user experience remains to be seen, analyst says
Couchbase, the NoSQL database beloved of modern applications developers, is trying to build a bridge to the old world with its 7.0 release.
The latest iteration of the open-source documents store database offers multi-statement SQL transactions and an approach to building schema-like structures into the database, allowing it to support multiple applications from the same data.
One database industry expert said Couchbase 7.0 would be welcomed by developers wanting to do more with their data in a single system, but whether it could withstand enterprise workloads from multiple applications is not clear.
Couchbase is a JSON document database with global users including PayPal, eBay, and travel distribution system Amadeus. The source licence was changed from Apache to a business source licence earlier this year. The source code to Couchbase Server Community Edition has been released on the GitHub repository.
To the latest release, Couchbase has added "multi-statement SQL transactions," which means statements that commit or roll back together. The development, therefore, supports multi-document SQL transactions with "interactions in microseconds all within one unified database platform," the vendor claimed.
Couchbase had already developed its own query language, N1QL, which conforms with ubiquitous SQL syntax and supports single document ACID transactions. From 6.5 it introduced multi-documents SQL transactions, said CTO Ravi Mayuram.
"With 7.0 we are offering multi-statement SQL transactions which cover what relational systems can offer from the standpoint of OLTP guarantees, and yet we preserve the performance and scale and flexibility – most importantly – of NoSQL systems. You no longer need two separate systems: one for flexibility, agility, performance and scale, and the other one for the classic transactional processing."
The other feature Couchbase hopes will convince devs to do more with its platform is a collection of features that give the schema-less database a schema-like feel. It does this through schema and table-like organising structures, called "scopes and collections."
"We wanted to introduce the equivalence of that because there are 40 years of database research we should be leveraging," he said.
In the Couchbase world, a database is a "bucket," a schema is a "scope," a table is a "collection," a row is a "document," and the column is a "feed." In this way, Couchbase 7.0 supports multiple applications from using the same data while allowing developers to "fence the data, and have a security model, which filters visibility and access to data from one user to the other in a very fine-grained manner," Mayuram said.
- Cassandra 4.0 finally out of the gates after being delayed for last-minute bug swat
- MongoDB 5.0 hits GA with a trio of new features for time series data, sharded workloads, Versioned APIs
- NASA reaches for graph DB to find people, skills for Moon and Mars missions
- Enterprise databases deployed in Kubernetes? Proceed with caution, warns seasoned analyst
Of course, some of these claims have in the past been greeted with the critical equivalent of slow clapping and the comment of "well done, you've created a schema, something the relational world did more than 40 years ago."
Speaking to The Register, Mayuram responded: "It's a good point, but if you look at it the other way around, relational systems have two major limitations, one is flexibility and the other is scale. We've solved both those things while preserving the semantics and the structure that relational systems offer."
Carl Olofson, IDC research vice president, said the document database model had "liberated the developer from the DBA: they don't have to ask for schema changes or deal with all those nasty standardised data definitions." But there is a price to pay.
When applications start sharing data and the structures aren't the same, they have to compromise. Running queries on a pure document database that has no indexes is very inefficient. Lastly, if different applications start capturing data that overlaps, inconsistencies can develop.
Olofson described Couchbase's approach to overcoming these problems as "somewhat elegant."
"It preserves as much as possible of the basic document model – you still have that flexibility – but also allows you to be somewhat disciplined about how you do it so that you can ensure consistency and share data better and also you can do better queries," he said.
"You have enough of an operational capability to be pretty competitive with operational relational databases, although you're not going to use it in a data warehouse: all databases have limitations," he said.
He said in a use case where an ecommerce application was using Couchbase for customer-facing applications and a relational database application for the backend, they might consider Couchbase for both.
"That is credible, but the real question is, what will the user experience be when people start exposing this technology to real-world loads. I can't answer that question, but arguably, if it stands up, it could be a really big deal," Olofson said. ®