Chapter 2. Storage as a Service
cloud-hosted forms. In addition, cloud vendors offer specialized relational DBMSs
that are desi gned to scale to particularly large data sizes.
Relational databases have two i mportant properties. First, they support a
relational algebra th at provides a clear, mathematical meaning to the SQL language,
facilitating efficient and correct implementations. Second, they support
ACID
semantics
, a term that captures four im portant database properties:
A
tomicity
(the entire transaction succeeds or fails),
C
onsistency (the data collection is never
left in an invalid or conflicting state),
I
solation (concurrent transactions cannot
interfere with each other), and
D
urability (once a transaction completes, s ystem
failures cannot invalidate the result).
2.2.4 NoSQL Databases
While relational DBMSs have long dominated the database world, other technologies
have become popular for some applicati on classes. A relational DBMS is almost
certainly the right technology to use for highly structured datasets of moderate size.
But if your data are less regular (if, for exampl e, you are dealin g with large amounts
of text or if different items have different properties) or extremely large, you may
want to consider a NoSQL DBMS . The design of these systems has typically been
motivated by a desire to sca le the quantities of data and number of users that can
be supported, and to deal with unstructured data that are not easily represented
in tabular form. For example, a
key-value store
can organize large numbers of
records, each of which associates an arbitrary key with an arbitrary value. (A
variant called a document store permits text search on the stored values.)
NoSQL databases h ave limitations relative to relational d ataba ses. The name
NoSQL is derived from “non SQL,” meaning that they do not support the full
relational algebra. For example, they typically do not support queries that join
two tables, such as those shown above.
Another definition of NoSQL is “not only SQL,” meaning that most of SQL
is supported but other properties are available. For example, a NoSQL database
may allow for the rapid ingest of large quantities of unstructured data, such as
the instrument events of UC3. Arbitrary data can be stored without modifications
to a database schema, and new col umn s introduced over time as data and/or
understanding evolves. NoSQL databases i n the cloud are often distributed over
multiple servers and also replicated over different data centers. Hence they often
fail to satisfy all of the ACID properties. Consistency is often replaced by
eventual
consistency
, meaning that database state may be momentarily inconsistent across
replicas. This relaxation of ACID properties is acceptable if your concern is to
27