The Easy, Common-Sense Guide to Solving Real Problems with NoSQL

The Mere Mortals® tutorials have earned worldwide praise as the clearest, simplest way to master essential database technologies. Now, there's one for today's exciting new NoSQL databases. NoSQL for Mere Mortals guides you through solving real problems with NoSQL and achieving unprecedented scalability, cost efficiency, flexibility, and availability.

Drawing on 20+ years of cutting-edge database experience, Dan Sullivan explains the advantages, use cases, and terminology associated with all four main categories of NoSQL databases: key-value, document, column family, and graph databases. For each, he introduces pragmatic best practices for building high-value applications. Through step-by-step examples, you'll discover how to choose the right database for each task, and use it the right way.

Coverage includes

--Getting started: What NoSQL databases are, how they differ from relational databases, when to use them, and when not to Data management principles and design criteria: Essential knowledge for creating any database solution, NoSQL or relational

--Key-value databases: Gaining more utility from data structures

--Document databases: Schemaless databases, normalization and denormalization, mutable documents, indexing, and design patterns

--Column family databases: Google's BigTable design, table design, indexing, partitioning, and Big Data

Graph databases: Graph/network modeling, design tips, query methods, and traps to avoid

Whether you're a database developer, data modeler, database user, or student, learning NoSQL can open up immense new opportunities. As thousands of database professionals already know, For Mere Mortals is the fastest, easiest route to mastery.



Autorentext

Dan Sullivan is a data architect and data scientist with more than 20 years of experience in business intelligence, machine learning, data mining, text mining, Big Data, data modeling, and application design. Dan's project work has ranged from analyzing complex genomics and proteomics data to designing and implementing numerous database applications. His most recent work has focused on NoSQL database modeling, data analysis, cloud computing, text mining, and data integration in life sciences. Dan has extensive experience in relational database design and works regularly with NoSQL databases. Dan has presented and written extensively on NoSQL, cloud computing, analytics, data warehousing, and business intelligence. He has worked in many industries, including life sciences, financial services, oil and gas, manufacturing, health care, insurance, retail, power systems, telecommunications, pharmaceuticals, and publishing.



Inhalt

Preface xxi

Introduction xxv

PART I: INTRODUCTION 1

Chapter 1 Different Databases for Different Requirements 3

Relational Database Design 4

E-commerce Application 5

Early Database Management Systems 6

Flat File Data Management Systems 7

Organization of Flat File Data Management Systems 7

Random Access of Data 9

Limitations of Flat File Data Management Systems 9

Hierarchical Data Model Systems 12

Organization of Hierarchical Data Management Systems 12

Limitations of Hierarchical Data Management Systems 14

Network Data Management Systems 14

Organization of Network Data Management Systems 15

Limitations of Network Data Management Systems 17

Summary of Early Database Management Systems 17

The Relational Database Revolution 19

Relational Database Management Systems 19

Organization of Relational Database Management Systems 20

Organization of Applications Using Relational Database Management Systems 26

Limitations of Relational Databases 27

Motivations for Not Just/No SQL (NoSQL) Databases 29

Scalability 29

Cost 31

Flexibility 31

Availability 32

Summary 34

Case Study 35

Review Questions 36

References 37

Bibliography 37

Chapter 2 Variety of NoSQL Databases 39

Data Management with Distributed Databases 41

Store Data Persistently 41

Maintain Data Consistency 42

Ensure Data Availability 44

Consistency of Database Transactions 47

Availability and Consistency in Distributed Databases 48

Balancing Response Times, Consistency, and Durability 49

Consistency, Availability, and Partitioning: The CAP Theorem 51

ACID and BASE 54

ACID: Atomicity, Consistency, Isolation, and Durability 54

BASE: Basically Available, Soft State, Eventually Consistent 56

Types of Eventual Consistency 57

Casual Consistency 57

Read-Your-Writes Consistency 57

Session Consistency 58

Monotonic Read Consistency 58

Monotonic Write Consistency 58

Four Types of NoSQL Databases 59

Key-Value Pair Databases 60

Keys 60

Values 64

Differences Between Key-Value and Relational Databases 65

Document Databases 66

Documents 66

Querying Documents 67

Differences Between Document and Relational Databases 68

Column Family Databases 69

Columns and Column Families 69

Differences Between Column Family and Relational Databases 70

Graph Databases 71

Nodes and Relationships 72

Differences Between Graph and Relational Databases 73

Summary 75

Review Questions 76

References 77

Bibliography 77

PART II: KEY-VALUE DATABASES 79

Chapter 3 Introduction to Key-Value Databases 81

From Arrays to Key-Value Databases 82

Arrays: Key Value Stores with Training Wheels 82

Associative Arrays: Taking Off the Training Wheels 84

Caches: Adding Gears to the Bike 85

In-Memory and On-Disk Key-Value Database: From Bikes to Motorized Vehicles 89

Essential Features of Key-Value Databases 91

Simplicity: Who Needs Complicated Data Models Anyway? 91

Speed: There Is No Such Thing as Too Fast 93

Scalability: Keeping Up with the Rush 95

Scaling with Master-Slave Replication 95

Scaling with Masterless Replication 98

Keys: More Than Meaningless Identifiers 103

How to Construct a Key 103

Using Keys to Locate Values 105

Hash Functions: From Keys to Locations 106

Keys Help Avoid Write Problems 107

Values: Storing Just About Any Data You Want 110

Values Do Not Require Strong Typing 110

Limitations on Searching for Values 112

Summary 114

Review Questions 115

References 116

Bibliography 116

Chapter 4 Key-Value Database Terminology 117

Key-Value Database Data Modeling Terms 118

Key 121

Value 123

Namespace 124

Partition 126

Partition Key 129

Schemaless 129

Key-Value Architecture Terms 131

Cluster 131

Ring 133

Replication 135

Key-Value Implementation Terms 137

Hash Function 137

Collision 138

Compression 139

Summary 141

Review Questions 141

References 142

Chapter 5 Designing for Key-Value Databases 143

Key Design and Partitioning 144

Keys Should Follow a Naming Convention 145

Well-Designed Keys Save Code 145

Dealing with Ranges of Values 147

Keys Must Take into Account Implementation Limitations 149

How Keys Are Used in Partitioning 150

Designing Structured Values 151

Structu…

Titel
NoSQL for Mere Mortals
EAN
9780134029870
Format
PDF
Hersteller
Digitaler Kopierschutz
Wasserzeichen
Dateigrösse
9.35 MB
Anzahl Seiten
552