Product SiteDocumentation Site

Chapter 1. Introduction

1.1. NoSQL - Why Are Relational Databases Not Good Enough?
1.2. Why JSONiq?
1.3. How to Run the Queries in This Book?
1.4. Acknowledgements
The possible solutions to a given problem emerge as the leaves of a tree, each node representing a point of deliberation and decision.
Niklaus Wirth

1.1. NoSQL - Why Are Relational Databases Not Good Enough?

Relational databases have existed for decades. The entity-relationship model is very powerful and with it, it is possible to model almost any structured data. SQL is the widely accepted standard for these databases. It supports the relational algebra operators like join, project, select, filter.
In the last decade, several companies saw the amount of data they needed to store and handle increase dramatically. They soon encountered problems scaling up and out. In his foreword on the "MongoDB Definitive Guide," Jeremy Zawodny explained it convincingly: once you add more replicas and shards, you realize you are stuck in the original schema you designed unless you invest considerable effort.
In order to solve this issue, a new generation of data stores appeared. They often share the same set of design principles:
  • The lines of a relational table are replaced with hierarchical data (semi-structured data, aka trees), while tables become collections of trees.
  • These trees are primarily associated with and indexed by an ID or a key.
  • Schemas are not mandatory, i.e., trees within a collection need not share the same structure (heterogeneity).
  • Some data stores see a tree as a kind of black box (key/value stores) while some other data stores use XML (like eXist) and more recently JSON (like MongoDB) syntax to represent trees.
These new technologies are often referred to as "NoSQL."