Database Advice Guide
Database Advice Guide
Why NoSQL
Databases?
An Architect’s Guide
Why successful projects rely on
NoSQL database applications
Contents
WHAT IS NOSQL? 3
Customer experience drives enterprise to NoSQL solutions 3
DEVELOPER AGILITY 6
DATABASE-AS-A-SERVICE 10
BENEFITS OF DBAAS 11
W H I TE P AP ER 2
WHAT IS NOSQL?
NoSQL databases are built from the ground up to be flexible, scalable, and capable
of rapidly responding to the data management demands of modern businesses.
This paper introduces the modern challenges that NoSQL databases address and
shows when to choose NoSQL over relational and why.
NoSQL databases emerged as a result of the exponential growth of the internet and
the rise of web applications. Google Bigtable research was released in 2006, as well
as an Amazon Dynamo research paper in 2007. Efficient distributed key-value (KV)
engines were essential to this evolutionary step and have propelled the technology
much further.
Agility means providing flexible schemas, APIs, robust SQL-based querying, text
search, analytics, and more. Scalability allows data to grow without sacrificing
performance and stability.
W H I TE P AP ER 3
NoSQL systems hold hierarchical JSON data but return it to the application as full or
partial JSON data structures, full-text search matches, SQL query results, key-based
values, or even big data analytics systems.
This convergence of the best of relational and the best of modern NoSQL simplifies
the information architecture of enterprises and helps developers deliver applications
more efficiently with familiar concepts and tooling, without needing to learn a dozen
different platforms.
For example, teams are now expected to build enterprise data management
infrastructure that includes the following characteristics:
• Adapt rapidly to changing requirements with frequent updates and new features
Consider just a few examples of Global 2000 enterprises that are deploying NoSQL
for mission-critical applications that have been featured in recent news reports:
• Tesco, Europe’s No. 1 retailer deploys NoSQL for e-commerce, product catalog,
and other applications
• Ryanair, the world’s busiest airline uses NoSQL to power its mobile app serving
over 3 million users
• GE deploys NoSQL for its Predix platform to help manage the industrial internet
• Sky / Peacock deploys NoSQL to offer a seamless viewing experience during peak
watching times
W H I TE P AP ER 4
Some of the high-level technical goals include:
• Effective data “plumbing” for real-time web applications and low latency
• Act as a service layer that pushes data as close to the customer as possible
Here are five trends that play into the advantages of NoSQL databases for
addressing the challenges of building software.
Trends Requirements
• S
upporting many different applications with different
The internet data structures
is connecting
everything • Ensuring software is “always on” with no excuse for downtime
“We chose Couchbase for its • Supporting continuous streams of data from the real-time web
memory-first architecture,
• Storing customer-generated semi-structured
which enables us to perform and unstructured data
W H I TE P AP ER 5
The previous requirements are extensive and challenge even the best systems to do
even more with less. Today’s extreme requirements can be loosely grouped into two
categories that impact two different levels of end users:
DEVELOPER AGILITY
“For us to set up a resilient To remain competitive, enterprises must innovate—and now they have to do it faster
implementation of
than ever before. Developers are under extraordinary pressure. Speed is critical, but
so is agility, since these applications evolve far more rapidly than legacy applications.
Couchbase, it took us
Relational databases have a restricted, flat data structure and don’t respond well to
minutes. We stood up three frequent changes in the data model. This often impedes the needs of modern, agile
servers, lit’em up, balanced projects, applications, and business requirements.
the load, and instantly we Application developers that are used to querying and performing transactions with
SQL can continue to use the same language in NoSQL platforms but operate against
were resilient.”
the JSON data that is stored. For example, Couchbase provides a SQL-based query
—ROBERT LAWRENCE, standard known as SQL++ (also known as N1QL) that returns results in JSON with
PRODUCT OWNER,
DIGITAL CATALYSRS, PG&E sets of rows and subdocument components where appropriate. This is in contrast to
the vast majority of other NoSQL databases (like MongoDB™) that don’t use SQL and
Case study: require developers to climb a new language learning curve.
www.couchbase.com/
customers/PG&E The combination of transactions and SQL greatly expands the number of use cases
where a NoSQL database can be considered. In the past, the inability to join or
handle transactional operations meant that NoSQL databases were only chosen for
the highest volume and scale use cases. But the option of using SQL and transactions
means that NoSQL databases can also be chosen for traditional RDBMS cases that
need more flexibility and power.
NoSQL databases operate as a primary content store, meaning you enter the data
in one application but can access it multiple ways depending on the use case. For
example, developers can use direct API calls to access a specific document using a
key or through a SQL query that returns multiple rows of data in a JSON response.
This is known as “multi-model.”
Other access methods are available depending on the database, including full-text
search systems that allow natural language search requests. Requests can be made
for full or partial “fuzzy” matches, geographic ranges, or wildcard searches. The
response includes a JSON document with lists of matching document IDs, contextual
information, and a relevancy score.
Full-text search systems are often separate from a database but NoSQL databases
like Couchbase include them as part of the underlying system, allowing managers to
simplify the overall architecture.
Big data analytics are possible as well, using complimentary subsystems that process
larger volumes of historical data. Using advanced indexing and query capabilities,
W H I TE P AP ER 6
also based on SQL++, more advanced analytics can be done in the same database
without needing a separate, external OLAP system.
Because the data is stored and indexed all within the one database product, it allows
developers to connect to one system and pass through the relevant requests.
Databases that support web, mobile, and IoT applications must be able to operate
at any scale. While it is possible to scale a relational database like Oracle (using, for
example, Oracle RAC), doing so is typically complex, expensive, and not fully reliable.
With Oracle, for example, scaling out using RAC technology requires numerous
components and creates a single point of failure that jeopardizes availability.
The database has to be able to scale reads, writes, and storage. This is a problem
for relational databases that are limited to scaling up—i.e., only being able to
scale by adding more processors, memory, and storage to a single physical server
(sometimes known as “vertical scaling”). As a result, the ability to scale efficiently, and
on demand, is a challenge. It becomes increasingly expensive, because enterprises
have to purchase bigger and bigger servers to accommodate more users and more
data. In addition, it can result in downtime if the database has to be taken offline to
perform hardware upgrades.
s
ser
ntU
cu rre
on
ofC
er
mb
Nu Server Capacity
RDBMS – The server
is too big or too
Server Load
W H I TE P AP ER 7
A distributed NoSQL database runs on commodity hardware to scale out—i.e.,
add more resources simply by adding more servers to a cluster (sometimes known
as “horizontal scaling”). The ability to scale out enables enterprises to scale more
efficiently by (a) deploying no more hardware than is required to meet the current
load; (b) applying less expensive hardware and/or cloud infrastructure; and (c)
scaling on demand and without downtime.
commodity servers
on demand so Cost ($)
Cost ($)
the hardware
resources match
the application load
Concurrent Users Concurrent Users
By distributing reads, writes, and storage across a cluster of nodes, NoSQL databases
are able to operate at any scale. Additionally, they are designed to be easy to
configure, install, and manage both small and large clusters.
Application(s) Application(s)
RDBMS – The failure Database Instance Database Instance Database Instance Database Instance
of a server or storage
device brings down
the entire database
LOCAL SHARED
STORAGE STORAGE
W H I TE P AP ER 8
In contrast to relational technology, a distributed, NoSQL database partitions and
distributes data to multiple database instances with no shared resources. Couchbase
goes a step further and does this automatically.
In addition, the data can be replicated to one or more instances for high availability
(intercluster replication) and in different geographic locations. While relational
databases like Oracle require separate software for replication, for example,
Oracle Active Data Guard, NoSQL databases do not—it’s built in and it’s automatic.
Couchbase’s cross data center replication (XDCR) feature also provides this
automatically.
In addition, automatic failover ensures that if a node fails, the database can continue
to perform reads and writes by sending the requests to a different node. Again,
Couchbase will perform this failover recovery and rebalancing automatically.
Application(s)
NoSQL – If an instance Database Instance Database Instance Database Instance Database Instance
RDBMS – Requires
separate software Replication Software Replication Software
DATABASE DATABASE
to replicate data to
other data centers
Data Center (Active) Data Center (Passive)
W H I TE P AP ER 9
A distributed, NoSQL database includes built-in replication between data centers—
no separate software is required. In addition, some include bidirectional replication
enabling full active-active deployments to multiple data centers. This enables the
database to be deployed in multiple countries or regions while providing local data
access to local applications and their users.
Deploying to multiple data centers not only improves performance, but enables
immediate failover via hardware routers. Applications don’t have to wait for the
database to discover the failure and perform its own failover.
DATABASE
NoSQL – Replication
between data centers
is fully built-in and
can be bi-directional
DATABASE DATABASE
DATABASE-AS-A-SERVICE
Many companies are looking to reduce their operational efforts and costs of running
software and hardware, with databases increasingly becoming a common area for
consideration. Typically a Database-as-a-Service, or DBaaS, streamlines and improves
operations in areas like IaaS setup and configuration, database provisioning,
database provisioning, operations management, scaling automation, monitoring,
and security.
W H I TE P AP ER 10
BENEFITS OF DBAAS
DBaaS offerings limit the work of often overstretched IT teams, providing convenience
BENEFITS OF DBAAS and opportunities to focus on more high-value projects. New databases can often be
spun up in minutes instead of a traditional multi-week provisioning process.
• Rapid setup
From a financial and business perspective, companies see benefits like:
• Easily scale or evolve
configurations • Rapid setup – DBaaS capabilities allow users to provision new database instances
when needed in a self-service, highly automated fashion. Developers can more
• High service levels
quickly test out new projects to drive company innovation.
• Security automation
• Easily scale or evolve configurations – As the needs of users and applications
change, modify the configuration of clusters to match those needs. The database
makes it easy to match regional needs and keep up with regulatory changes.
• High service levels – Most DBaaS systems provide at least a 99% uptime SLA, and
often much higher. Replication and redundancy architecture improve quality even
further as deployments go global.
As enterprises shift to cloud, mobile, social media, and big data technologies,
developers, architects, and operations teams have to build and maintain web,
mobile, and IoT applications faster, and at a greater scale. NoSQL is increasingly the
preferred database technology to power today’s web, mobile, and IoT applications.
With NoSQL, enterprises are better able to both develop with agility and operate
at any scale—and deliver the performance and availability required to meet the
demands of businesses.
W H I TE P AP ER 11
Modern customer experiences need a flexible database platform that can
power applications spanning from cloud to edge and everything in between.
Couchbase’s mission is to simplify how developers and architects develop,
deploy and consume modern applications wherever they are. We have
reimagined the database with our fast, flexible and affordable cloud database
platform Capella, allowing organizations to quickly build applications that
deliver premium experiences to their customers—all with best-in-class price
performance. More than 30% of the Fortune 100 trust Couchbase to power
their modern applications.