Chapter-2_NoSQL_Databases_part1
Chapter-2_NoSQL_Databases_part1
NoSQL Databases
Outline
• History
• Concepts
• ACID
• BASE
• CAP
• Data Models
• Key-Value
• Document
• Column-based
• Graph
• Tree-like structure
• Data stored as records connected by links
• Support only one-to-one and one-to-many relationships
Supply:
Supplier:
LNR Lname Status Sitz PNR Pname Ort
LNR: L1 … … … … … … …
Lname: Meier
Status: 20 … … … … … … …
Sitz: Wetter … … … … … … …
Project:
PNR: P2
Pname: Pleite
Ort: Bonn
Pieces: TNR Tname Farbe Gewicht LNR PNR TNR Menge
TNR: T6 … … … … … … … …
Tname: Schraube
Farbe: rot … … … … … … … …
Gewicht: 03 … … … … … … … …
Menge: 700
Supply:
Supplier:
LNR Lname Status Sitz PNR Pname Ort
LNR: L1 … … … … … … …
Lname: Meier
Status: 20 … … … … … … …
Sitz: Wetter L1 Meier 20 Wetter P2 Pleite Bonn
Project:
PNR: P2
Pname: Pleite
Ort: Bonn
Pieces: TNR Tname Farbe Gewicht LNR PNR TNR Menge
TNR: T6 … … … … … … … …
Tname: Schraube
Farbe: rot … … … … … … … …
Gewicht: 03 T6 Schraube rot 03 … … … …
Menge: 700
...
Supply:
Supplier:
LNR Lname Status Sitz PNR Pname Ort
LNR: L1 … … … … … … …
Lname: Meier
Status: 20 … … … … … … …
Sitz: Wetter L1 Meier 20 Wetter P2 Pleite Bonn
Project:
PNR: P2
Pname: Pleite
Ort: Bonn
Pieces: TNR Tname Farbe Gewicht LNR PNR TNR Menge
TNR: T6 … … … … … … … …
Tname: Schraube
Farbe: rot … … … … … … … …
Gewicht: 03 T6 Schraube rot 03 L1 P2 T6 700
Menge: 700
• Horizontal scaling
Use many commodity ma-
chines and form computer
clusters or grids
– Cluster maintenance
• Horizontal scaling
Use many commodity ma-
chines and form computer
clusters or grids
– Cluster maintenance
• Soft State: The system‘s state changes over time. Stale data
may expire if not refreshed.
Levels of Consistency:
Eventual Consistency
Immediate Consistency
Strong Consistency
Transactions
Read-Your-Own-Writes
Levels of Consistency:
Levels of Consistency:
• Replication consistency:
Data is consistent across multiple replicas (on multiple
machines)
Big Data Management and Analytics 66
About the concepts behind NoSQL
Databases
DATABASE
SYSTEMS
GROUP
CONSISTENCY
AVAILABILITY PARTITION
TOLERANCE
C C
A P
A Each client can al- The system works well
ways read and write despite physical
network partitions
C C
ACID
AC-Systems CP-Systems
- RDBMSs (MySQL,
Postgres, …)
BASE
A P
A Each client can al-
AP-Systems
The system works well
ways read and write despite physical
network partitions