Chapter Objectives
In this chapter, you will learn:
• what is meant by “NoSQL” and how this movement differs from earlier approaches;
• to understand the differences between key–value-, tuple-, document-, column-, and graph-based databases;
• about the defining characteristics of NoSQL databases, such as their capability to scale horizontally, their approach toward data replication and how this relates to eventual consistency, their APIs, and how they are queried and interacted with;
• how to query NoSQL databases, using MapReduce, Cypher, and other approaches.
Sober has been happily using its relational database system for quite a while now, but is experiencing some limits of its existing system. In particular, due to the growth of its mobile applications (now serving many users simultaneously), some queries are performing slower, causing users to wait a few seconds when working with the app. Sober's database administrators have identified that this is mainly due to the normalized approach of its relational database model, causing many queries to involve joining tables, which results in bottlenecks when thousands of users are hailing cabs simultaneously.
Another issue is that the mobile developers regularly want to experiment with new features (to do so, a “beta” version of the app is rolled out to a subset of users), though given the emphasis on data consistency put forward by RDBMSs, changing existing data schemas so they can handle new data fields is a time-intensive effort. The app developers are not very familiar with this, causing back-and-forth between the development team and the database administrators.
Given these new issues, Sober is thinking of different scenarios to handle its growth. One option would be to roll out additional servers to handle the increased usage, but keep using the RDBMS system to do so. Another possibility would be to explore a NoSQL database solution. Sober's database administrator has heard about newer approaches such as MongoDB, Cassandra, and others, which offer strong scaling opportunities and a schema-free approach to data management.
Relational database management systems (RDBMSs) put a lot of emphasis on keeping data consistent. They require a formal database schema, and new data or modifications to existing data are not accepted unless they comply with this schema in terms of data type, referential integrity, etc. Sometimes this focus on consistency may become a burden, because it induces (in some cases unnecessarily) overhead and hampers scalability and flexibility.
Review the options below to login to check your access.
Log in with your Cambridge Higher Education account to check access.
If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.