2. NO SQL- Non Relational Database
• No SQL provides a mechanism for storage and
retrieval of data that is modelled in means
other than tabular relations.
3. Why Cloud Data Stores
Explosion of social media sites (Facebook,
Twitter) with large data needs
Explosion of storage needs in large web sites
such as Google, Yahoo
Much of the data is not files
Rise of cloud-based solutions such as Amazon
S3 (simple storage solution)
Shift to dynamically-typed data with frequent
schema changes
4. Scaling
Best way to provide ACID and a rich query model is
to have the dataset on a single machine
RDBMS were not designed to be distributed
As database grows, rate of number of transactions
per second falls.
One solution is partitioning of large tables that is to
scale out the database across a cluster of separate
database servers.
5. What is No SQL ?
Stands for Not Only SQL
Class of non-relational data storage systems
Usually do not require a fixed table schema
Do not use the concept of joins which are expensive
operations.
Lack ACID ( Atomicity, Consistency, Isolation,
Durability) properties.
Leading users of NoSQL datastores are social
networking sites such as Twitter, Facebook, LinkedIn
It's not a replacement for a RDBMS but compliments
it
6. CAP Theorem
CAP theorem states that it is impossible for any
shared data system to simultaneously hold these
three properties:
1. Consistency ( all nodes see same data at the same
time)
2. Availability ( guarantee that every request receives
a response )
3. Partition ( Partitioning or distributing the
database)
You can have at most two of these three properties
7. CAP Theorem
To scale out, you have to partition. That leaves
either consistency or availability to choose from,
Choose a specific approach based on the needs of
the service.
CAP Theorem states: Strict Consistency can't be
achieved at the same time as availability and
partition-tolerance.
When no updates occur for a long period of time,
eventually all updates will propagate through the
system and all the nodes will be eventually
consistent
8. BASE
Scalability and better performance of No SQL is
achieved by sacrificing ACID properties.
No SQL is having BASE compatibility
BA – Basically available
S – Soft State
E- Eventually consistent
Basically Available - system seems to work all the time
Soft State - it doesn't have to be consistent all the time
Eventually Consistent - becomes consistent at some
later time
9. Types of No Sql databases
1. Key-value data model
2. Document-data model
3. Column family data model
4. Graph data model
11. Key-Value Data model
The key can be auto-generated while the value can be
String, JSON, BLOB (basic large object) etc
This key/value type database allow clients to read and
write values using the key as follows:
1. get(key) -- Extract the value given a key
2. put(key, value) -- Create or update the value given
its key
3. delete(key) -- Remove the key and its associated
value
4. execute(key, operation, parameters) -- Invoke an
operation to the value (given its key) which is a
special data structure (e.g. List, Set, Map .... etc).
12. Key-Value Data model
Performance is enhanced to a great degree because of
the cache mechanisms that accompany the mappings
Eg: Amazon DynamoDB is a fully managed
proprietary No SQL database service that is offered
by Amazon.com as part of the Amazon Web
Services portfolio
13. No SQL distinguishing Characteristics
Suitable for applications that supports large amount of
unstructured data.
Schema-less
Do not support Joins
Do not follow ACID properties
Scalable
Data is replicated to multiple nodes (therefore
identical and fault-tolerant) and can be partitioned