Preface 1
Chapter 1: An Overview of NoSQL 7
Defining NoSQL 7
History 8
What NoSQL is and what it is not 9
Why NoSQL? 11
List of NoSQL Databases 11
Summary 12
Chapter 2: Characteristics of NoSQL 13
Application 13
RDBMS approach 14
Challenges 18
NoSQL approach 20
Summary 23
Chapter 3: NoSQL Storage Types 25
Storage types 25
Column-oriented databases 26
Advantages 27
Example 28
Document store 29
Advantages 31
Examples 32
Key-value store 41
Advantages 42
Examples 42
Graph store 43
Advantages 44
Examples 45
Multi-storage type databases 46
Table of Contents
[ ii ]
Comparing the models 47
Summary 49
Chapter 4: Advantages and Drawbacks 51
Transactional application 52
Entity schema requirements 52
Data access requirements 52
What NoSQL can do 52
What NoSQL cannot do 53
Decision 53
Computational application 53
Entity schema requirements 53
Data access requirements 54
What NoSQL can do 54
What NoSQL cannot do 55
Decision 55
Web-scale application 56
Entity schema requirements 56
Data access requirements 57
What NoSQL can do 57
What NoSQL cannot do 57
Decision 57
Summary 58
Chapter 5: Comparative Study of NoSQL Products 59
Comparison 60
Technical comparison 60
Implementation language 60
Engine types 61
Speed 62
Features 67
Limits 67
Bulk operations 68
Query options 73
Security 75
Access management 75
Encryption 77
Multitenancy 78
RDBMS related features 79
Deployment and maintenance 79
Availability 79
Maintenance 81
Table of Contents
[ iii ]
Tools 82
Protocol 83
Nontechnical comparison 84
Source and license 84
Community and vendor support 86
Summary 87
Chapter 6: Case Study 89
Application definition 89
Requirement analysis 90
Implementation using MongoDB 90
Features and constraints 91
Setup 91
Database design 92
Database queries 92
Database modeling 93
Schema definition 94
Writing queries 96
Queries for a single entity, simple result 96
Queries for a single entity, Aggregate 97
Queries for one-to-one relationship 98
Queries for one-to-many relationship 98
Queries for many-to-many relationship 101
Miscellaneous queries 103
Model refinements 106
References using a non-ID property 106
Denormalization and document embedding 108
Cache document approach 112
Miscellaneous changes 113
Summary 114
Appendix: Taxonomy 115
Vocabulary 115
Relationship between CAP, ACID, and NoSQL 118
Index 119