No SQL
No SQL
Dr. Kavitha H,
ASSOC. PROFESSOR
DEPT OF ISE SIT
SCHEMALESS DATABASES
• A key-value store allows you to store any data you like under a key
• You can easily add new things as you discover them
• A document database effectively does the same thing, since it makes
no restrictions on the structure of the documents you store
• Column-family databases allow you to store any data under any
column you like
• Graph databases allow you to freely add new edges and freely add
properties to nodes and edges as you wish
MATERIALIZED VIEW
• A view is like A relational table but defined by computation over the
base tables.
• When a views is accessed the databases execute the computation
required.
• Materialized views are created using MapReduce computation.
DISTRIBUTION MODELS
The distribution model the data store can give us the ability:
Replication
Sharding
REPLICATION
• Replication copies data across multiple servers, so each
bit of data can be found in multiple places.
• Replication comes in two forms,
o Master-slave replication
o Peer-to-peer replication
• Master-slave replication makes one node the
authoritative copy that handles writes while slaves
synchronize with the master and may handle reads.
• Peer-to-peer replication allows writes to any node; the
nodes coordinate to synchronize their copies of the data.
MASTER-SLAVE REPLICATION
• In this setting one node is designated as the master and the other as
slaves.
• The master is the authoritative source for the data and designed to
process updates and send them to slaves.
• The slaves are used for read operations.
PEER-TO-PEER REPLICATION
• Master-Slave replication helps with read scalability but has problems
on scalability of writes.
• It provides resilience on read but not on writes.
• The master is still a single point of failure.
• Peer-to-Peer attacks these problems by not having a master.
• All the replica are equal (accept writes and reads)
• With a Peer-to-Peer we can have node failures without lose write
capability and losing data.
SHARDING