NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document...
-
Upload
felicity-jackson -
Category
Documents
-
view
212 -
download
0
Transcript of NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document...
![Page 1: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/1.jpg)
NoSQL, No SQL!!, No, SQL?
Raj Nair, Penton
![Page 2: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/2.jpg)
Variety is the spice of life
Key-Value stores
Document
storesColumnFamilyGraphHybrid
Spice can lead to
heartburn
![Page 3: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/3.jpg)
General Advantages
Programmer friendly
Web friendly
No pre-defined schemas
Better value @scale
![Page 4: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/4.jpg)
General ChallengesMore onus on the application
Lose the power of SQL
Different needs can require different stores
How much do you care about “immediate consistency” ?
Good knowledge of access patterns for schema design
![Page 5: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/5.jpg)
Key-Value stores
Simple
Fast
Uses
• hash table/dict of keys and values
• Super fast for key based access
• Session Management• High frequency atomic
operations• Caching
![Page 6: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/6.jpg)
Document stores
Rich
Powerful
Uses
• JSON format• Structure
• Indexing capabilities• REST interfaces
• Non-key based queries• Schema• All of that at Scale
![Page 7: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/7.jpg)
Columnar Stores (Special Mention)
• Physical storage is “column” based
• Rows only materialized in memory
• Great for analysis/warehouse type workload• Billions of rows, you want only a handful of columns • Faster aggregation
![Page 8: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/8.jpg)
Column Family
Flexible
High Scale
Uses
• No format imposed
• Read/write • Low latency
• Logs• Messaging• Temporal/TimeSeries
![Page 9: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/9.jpg)
Graph databases
Niche
Uses
• Model Pairwise relations
• Networked systems• Triple stores or RDF• Recommendation
engine base (matches on dating sites?)
![Page 10: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/10.jpg)
“Other”
Postgres – has built KV storage, HStore
RDF / triple stores – specialized graph stores
XML stores
New SQL – yeah really!!
![Page 11: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/11.jpg)
My “Hypothesis” – Long Tail, DataAp
plic
ation
s u
sing
da
ta
Data available for active use
PB100 TB50 TB 500 TB500 GB
Single server
RDBMS
Clustered RDBMS
Upto low 100s of GB
100’s of GB
to few TBs
** Not to Scale** Illustrative only
NoSQL
![Page 12: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/12.jpg)
Workload Economics
Mins to hours$ per GB
<200 ms
$$ per GB
$$$$ per GBIn-memory - Few GBs
Operational NoSQL - 100’s GBs to few TBs
Analytic NoSQL - TBs to 100’s TB
Hadoop - TBs to PBs
> 200 ms to 2 secs$$$ per GB
Few seconds to minutes
* Nieman Marcus approach presented at TDWI Solution Summit 2014
![Page 13: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/13.jpg)
Popular Document StoresMongoDB CouchDB/CouchBase
Benefits Developer friendlyIndexing
Operations friendly,Easy scale outCaching support
Challenges Harder to scale , sharding, keys, write locks
Unique query design, complex index creation
CAP Leans towards “C” Leans towards “A”
So when do I use it?
- Your RDBMS is growing out of a single server environment or you are in clustered RDBMS mode - You’d rather respond correctly or not give an answer at all - You are anticipating a 2-4 node cluster
- When low latency is a high priority for you - Additionally, you want richness of document store with query flexibility- Scale out management needs to
be friendly- You prefer that app always gets a
response
![Page 14: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/14.jpg)
ColumnFamilyHBase Cassandra
Benefits Really scales!! Columns and Rows! SQL “like” query language
Challenges Leaves a lot to the application codeNo query language
Unique query design, complex index creation
CAP Leans towards “C” Leans towards “A”
So when do I use it?
When eventual consistency is not an option , but you can live with “less availability”When you have a finite number of key-based access patternsWhen your programmers are comfortable buidling queries You are working on the Hadoop stack and prefer strong Hadoop integration
When you need When query patterns are more complicated and you need to use secondary indexesWhen your developers prefer an “SQL like” interface for queries
![Page 15: NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.](https://reader035.fdocuments.in/reader035/viewer/2022072005/56649cec5503460f949b8516/html5/thumbnails/15.jpg)
Everyone has a sayDictionaries,
variables, objects, arrays
How many systems? Who has the skills?
Stability Easy to meet changing
needs, flexibility
SLAs
App Developer
OpsBusiness
Customer