Chapter 5c
Chapter 5c
1
Contents
Click to edit Master title style
• BASE
• No SQL
2 2
BASE
Click to edit Master title style
• BASE is a database design principle based on the CAP theorem and
leveraged by database systems that use distributed technology.
• basically available
• soft state
• eventual consistency
3 3
BASE….
Click to edit Master title style
• Database will always acknowledge a client’s request, either in the form of
the requested data or a success/failure notification.
4 4
Soft State
Click to edit Master title style
2. Before the other peers are updated, User B requests the same
record from Peer C.
6 6
Click to edit
Eventual Master title style
consistency
• Eventual consistency is the state in which reads by
different clients, immediately following a write to the
database, may not return consistent results.
• The database only attains consistency once the changes
have been propagated to all nodes.
1.User A updates a record.
2.The record only gets updated at Peer A, but before the
other peers can be updated, User B requests the same
record.
3.The database is now in a soft state. Stale data is
returned to User B from Peer C.
4.However, the consistency is eventually attained, and
User C gets the correct value.
7 7
Click to edit Master title style
No SQL?
8 8
NoSQL
Click Definition
to edit Master title style
From www.nosql-database.org:
9 9
NoSQL
Click and
to edit Bigtitle
Master Datastyle
11
11
Whytoare
Click edit RDBMS
Master titlenot
stylesuitable for
Big Data
• The context is Internet
• RDBMSs assume that data are Dense
• Largely uniform (structured data)
• Data coming from Internet are
Massive and sparse
Semi-structured or unstructured
• With massive sparse data sets, the typical storage
mechanisms and access methods get stretched
12
12
NoSQL
Click Database
to edit Master titleTypes
style
Discussing NoSQL databases is complicated because there are a
variety of types:
{
_id: ObjectId("51156a1e056d6f966f268f81"),
type: "Article",
author: "Derick Rethans",
title: "Introduction to Document Databases with MongoDB",
date: ISODate("2013-04-24T16:26:31.911Z"),
body: "This arti…"
},
{
_id: ObjectId("51156a1e056d6f966f268f82"),
type: "Book",
author: "Derick Rethans",
title: "php|architect's Guide to Date and Time Programming with PHP",
isbn: "978-0-9738621-5-7"
}
15
15
Click to edit
Key/Value Master title style
stores
16
16
Click
SortedtoOrdered
edit Master title style
Column-Oriented Stores
• Everything is stored as an
edge, a node or an attribute.
• Each node and edge can have
any number of attributes.
• Both the nodes and edges can
be labelled.
• Labels can be used to narrow
searches.
18
18