Professional Documents
Culture Documents
- What is NoSQL ?
- BASE principle
- Cloud Spanner
- What is NoSQL ?
- BASE principle
- Cloud Spanner
1
Tiwari, S. (2011). Professional NoSQL. John Wiley & Sons.
Essam Mansour (Concordia) SOEN 363 7 / 84
What is NoSQL?
NoSQL is not a single product or even a single technology. It represents
a class of products and a collection of diverse, and sometimes related,
concepts about data storage and manipulation.
No Fixed Schema
No Join Operations
Expensive Operation for combination of records from two or more
tables
- What is NoSQL ?
- BASE principle
- Cloud Spanner
2
https://cloud.google.com/bigtable/
3
http://cassandra.apache.org/
4
https://aws.amazon.com/dynamodb/
Essam Mansour (Concordia) SOEN 363 16 / 84
NoSQL Evolution
5
Sakr, S., Liu, A., Batista, D. M., Alomari, M. (2011). A survey of large scale data
management approaches in cloud environments. IEEE Communications Surveys &
Tutorials.
Essam Mansour (Concordia) SOEN 363 17 / 84
Where is NoSQL now?
- What is NoSQL ?
- BASE principle
- Cloud Spanner
Consistency
Every node needs to always see the same data value at any given instance
Availability
The system should continue to operate even if nodes in a cluster crash
or some of the hardware/software parts are down at any time.
Partition Tolerance
The systems continues to operate in the presence of network partitions.
Any distributed database with shared data, can have at most two of
the three desirable properties underlineConsistency, underlineAvail-
ability, and underlinePartition Tolerance
- What is NoSQL ?
- BASE principle
- Cloud Spanner
You are buying some items from a website that uses the ”Shopping
Cart” and ”CheckOut” constructs.
The issue here is that if you have used the ACID transaction control
system, you may prevent some customers from taking an order and
block them for a while so you may lose this customer.
6
Vogels, Werner. Eventually consistent. Communications of the ACM (2009)
Essam Mansour (Concordia) SOEN 363 33 / 84
NoSQL Control Using BASE
BASE systems tend to be simpler and faster than ACID as they don’t
require handling of many events by locking and unlocking resources like
in case of ACID systems
7
Pritchett, Dan. BASE: An ACID alternative. ACM Queue (2008
Essam Mansour (Concordia) SOEN 363 34 / 84
Reliable Database Transactions Control
- What is NoSQL ?
- BASE principle
- Cloud Spanner
- What is NoSQL ?
- BASE principle
- Cloud Spanner
No query Optimizer
8
https://neo4j.com/
Essam Mansour (Concordia) SOEN 363 47 / 84
Example:
The MATCH command will retrieve all the nodes with specific relation
(m)-[:Friendship]->(n)
Essam Mansour (Concordia) SOEN 363 52 / 84
DELETE
Example: HBase9
9
https://hbase.apache.org/
Essam Mansour (Concordia) SOEN 363 59 / 84
Example:
Country Product Sales
US Alpha 3000
US Beta 1250
ES Alpha 700
UK Alpha 450
Example:
create ’student’, ’personal data’, ’courses’
The ”get” command will retrieve data from a given table based on
some parameters
The ”scan” command will retrieve all data from a given table
scan ’students’
10
https://www.mongodb.com/
Essam Mansour (Concordia) SOEN 363 66 / 84
Example:
The find() command will retrieve all the documents of the given
collection.
db.collection name.find()
db.students.find(”idNo”:”87787”)
The update() command will retrieve all the documents of the given
collection.
db.collection name.update()
db.collection name.remove()
11
http://nosql-database.org/
Essam Mansour (Concordia) SOEN 363 72 / 84
Outline
- What is NoSQL ?
- BASE principle
- Cloud Spanner
The three of the most common methods used in the process of indexing
in NoSQL databases are:
B-Tree Indexing
T-Tree Indexing
O2-Tree Indexing
- What is NoSQL ?
- BASE principle
- Cloud Spanner
14
https://cloud.google.com/spanner/
Essam Mansour (Concordia) SOEN 363 78 / 84
NewSQL
15
Grolinger, Katarina, et al. Data management in cloud environments: NoSQL and
NewSQL data stores. Journal of Cloud Computing: advances, systems and applications,
2013
Essam Mansour (Concordia) SOEN 363 79 / 84
NewSQL
Data
Data Warehouse
Warehouse RDBMS
RDBMS
RDBMS NoSQL
1985-1995
1995-2010 2010-Now