NoSQL Cheng Lei Department of Electrical and Computer Engineering University of Victoria Mar 05, 2015
Outline ❖ Why NoSQL? ❖ Aggregate Data Model ❖ Distribution Model
❖ Why NoSQL? ❖ Aggregate Data Model ❖ Distribution Model
Why NoSQL ? Impedance mismatch the difference between the relational model and the in-memory data structures Working on clusters: More sufficiently Schemaless Opensource
❖ Why NoSQL? ❖ Aggregate Data Model ❖ Distribution Model
Aggregate Data Model Aggregate: an aggregate is a collection of related objects treated as a unit.
Key-Value Data Model The aggregate is opaque to DB, just some big blob of mostly meaningless bits Access aggregates by lookup based on the keys
Document Data Model The aggregate is built by the structure of the document
Column-Family Stores It is a two-level map The first key is often described as a row identifier Second-level values are referred to as columns
❖ Why NoSQL? ❖ Aggregate Data Model ❖ Distribution Model
Distribution Models Single server Sharding Master-Slave Replication Peer-to-Peer Replication Combining Sharding & Replication
Sharding Putting different parts of data onto different servers
Master-Slave Replication One node as the master, controlling the operations on the rest nodes All changes are made to the master The master propagates the changes to slaves The slave node can be assigned as the master if master fails
Peer-to-Peer Replication Reads and writes on each single server Each node synchronizes the writes with each other Consistency issues may occur
Combining Sharding & Replication Master-Slave replication &sharding Multiple masters Each data item only has single master Peer-to-Peer replication & Sharding Make 3 copies of node data
Thank You!!!