NoSQL DatabasesKaramjit KaurCOMPUTER SCIENCE AND ENGINEERING DEPARTMENTTHAPAR UNIVERSITYPATIALA 147004April 29, 2013
NoSQL in Real WorldIn 2006developed and uses BigTable [1]developed and uses Dynamo [2]uses CouchDB [3]In 2009developed and...
Introduction to NoSQL DatabasesNoSQL = “No SQL”NoSQL = “Not Only SQL”Carlo Strozzi used the term NoSQL in 1998 to name his...
NoSQL Database ModelDoes NotUse SQL as the query languageRequire fixed table schemasSupport join operationsGive all ACID pr...
Why Now?Three V’sVelocity – Speed of data in and outVolume – Large amount of data, ScalabilityVariety – Semi-structured or...
Benefits of Relational DatabasesIncredibly matureProvides immediate consistencyIntegrity of data is enforcedEfficient use of ...
Problems with Relational DatabasesVertical scaling (scaling up) [13]Replication with strong consistency limits availabilit...
NoSQL AdvantagesNo unwanted complexityHigh throughputHorizontal scalabilityEconomicalAvoidance of expensive object-relatio...
Classification of NoSQL DatabasesKaramjit Kaur (TU) NoSQL Databases April 2013 9 / 27
Key-Value Data StoreData is organized as an associative array of entriesKey based storage, updation and retrievalAllow the...
Karamjit Kaur (TU) NoSQL Databases April 2013 11 / 27
Document Data StoreStores, retrieves and manages semi-structured dataSupport multiple types of documents and nested docume...
Karamjit Kaur (TU) NoSQL Databases April 2013 13 / 27
Column-oriented Data StoreAlso called extensible record storesData is stored column-wise instead of row-wiseGroup of colum...
Karamjit Kaur (TU) NoSQL Databases April 2013 15 / 27
Graph-based Data StoreEmploy nodes (like entities), properties (attributes), and edges (rela-tionships)Faster for associat...
Karamjit Kaur (TU) NoSQL Databases April 2013 17 / 27
NoSQL DisadvantagesNot mature enoughLack of supportStandardization pendingLess expertiseRequire redesigningReluctance of e...
New SQL Databases = SQL + NoSQL DatabasesTerm coined by research group named ’451’ in their famous report,“NoSQL, NewSQL a...
One Size Does Not Fit AllRedis for user sessions: Rapid access for reads and writesRDBMS for financial data: Transactional ...
Karamjit Kaur (TU) NoSQL Databases April 2013 21 / 27
References I[1] F. Chang, J. Dean, S. Ghemawat, W. C. Hsieh, D. A. Wallach,M. Burrows, T. Chandra, A. Fikes, and R. E. Gru...
References II[4] D. Arseneau. (2010, Aug.) 10 things you should know about nosqldatabases. [Online]. Available: http://www...
References III[10] C. Strozzi. Nosql a relational database management system. [Online].Available: http://www.strozzi.it/cg...
References IV[15] (2006, Nov.) The neo database. [Online]. Available:http://dist.neo4j.org/neo-technology-introduction.pdf...
References V[22] The JustOneDB website. [Online]. Available:http://www.justonedb.com/Karamjit Kaur (TU) NoSQL Databases Ap...
Thank YouKaramjit Kaur (TU) NoSQL Databases April 2013 27 / 27
Upcoming SlideShare
Loading in …5
×

No sql

2,992 views
2,837 views

Published on

Published in: Education
3 Comments
6 Likes
Statistics
Notes
No Downloads
Views
Total views
2,992
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
0
Comments
3
Likes
6
Embeds 0
No embeds

No notes for slide

No sql

  1. 1. NoSQL DatabasesKaramjit KaurCOMPUTER SCIENCE AND ENGINEERING DEPARTMENTTHAPAR UNIVERSITYPATIALA 147004April 29, 2013
  2. 2. NoSQL in Real WorldIn 2006developed and uses BigTable [1]developed and uses Dynamo [2]uses CouchDB [3]In 2009developed and uses Sherpa [4]developed and uses Voldemort [5]developed and used Cassandra [6], now uses HBase [7], and use Cassandra [6], , , , anduse MongoDB [8]In 2011introduced their own NoSQL [9]Karamjit Kaur (TU) NoSQL Databases April 2013 2 / 27
  3. 3. Introduction to NoSQL DatabasesNoSQL = “No SQL”NoSQL = “Not Only SQL”Carlo Strozzi used the term NoSQL in 1998 to name his lightweight,open-source relational database that did not expose the standard SQLinterface [10].In 2009, Eric Evans reintroduced the term to describe the growingnon-RDBMS movement [11].Broadly refers to a set of data stores that do not use SQL or a relationalmodel to store data.Karamjit Kaur (TU) NoSQL Databases April 2013 3 / 27
  4. 4. NoSQL Database ModelDoes NotUse SQL as the query languageRequire fixed table schemasSupport join operationsGive all ACID properties (provides BASE [12] instead)DoesScale horizontally [13]Provide eventual consistency [14]Support shared nothing architectureKaramjit Kaur (TU) NoSQL Databases April 2013 4 / 27
  5. 5. Why Now?Three V’sVelocity – Speed of data in and outVolume – Large amount of data, ScalabilityVariety – Semi-structured or unstructured data, Impedance mismatchAvailability of cheap main memoryChange in architecture – from Web 1.0 to Web 2.0+Need for high availabilityHigh personnel costKaramjit Kaur (TU) NoSQL Databases April 2013 5 / 27
  6. 6. Benefits of Relational DatabasesIncredibly matureProvides immediate consistencyIntegrity of data is enforcedEfficient use of storage space if properly normalizedPowerful query languageHelp is plentiful and easy to findSupported by everyone and everythingKaramjit Kaur (TU) NoSQL Databases April 2013 6 / 27
  7. 7. Problems with Relational DatabasesVertical scaling (scaling up) [13]Replication with strong consistency limits availabilitySingle point of failureObject relational impedance mismatch [15]Static, rigid and inflexible designPoor handling of semi-structured and non-structured dataExpensive join operations due to normalizationKaramjit Kaur (TU) NoSQL Databases April 2013 7 / 27
  8. 8. NoSQL AdvantagesNo unwanted complexityHigh throughputHorizontal scalabilityEconomicalAvoidance of expensive object-relational mappingFlexible data modelReduced DBA workloadKaramjit Kaur (TU) NoSQL Databases April 2013 8 / 27
  9. 9. Classification of NoSQL DatabasesKaramjit Kaur (TU) NoSQL Databases April 2013 9 / 27
  10. 10. Key-Value Data StoreData is organized as an associative array of entriesKey based storage, updation and retrievalAllow the application developer to store schema-less dataFast storage and retrievalTransparent partition and replication (based on keys)Most famous key-value data store: Amazon’s Dynamo [2]Other examples: Redis [16], Voldemort [5]Karamjit Kaur (TU) NoSQL Databases April 2013 10 / 27
  11. 11. Karamjit Kaur (TU) NoSQL Databases April 2013 11 / 27
  12. 12. Document Data StoreStores, retrieves and manages semi-structured dataSupport multiple types of documents and nested documents tooEach document is identified by a unique keyProvides API that allow retrieving documents based on their contentsDifferent documents may have different fieldsExamples: Cassandra [6], Hbase [7]Karamjit Kaur (TU) NoSQL Databases April 2013 12 / 27
  13. 13. Karamjit Kaur (TU) NoSQL Databases April 2013 13 / 27
  14. 14. Column-oriented Data StoreAlso called extensible record storesData is stored column-wise instead of row-wiseGroup of columns is called column family and is analogous to table inrelational databaseColumns of a table are distributed over multiple nodes by using columngroupsNew columns can be easily added to column familiesEach row can have a different set of columnsAllows versioning of dataMost famous column-oriented data store: Google’s Bigtable [1]Other examples: CouchDB [3], MongoDB [8]Karamjit Kaur (TU) NoSQL Databases April 2013 14 / 27
  15. 15. Karamjit Kaur (TU) NoSQL Databases April 2013 15 / 27
  16. 16. Graph-based Data StoreEmploy nodes (like entities), properties (attributes), and edges (rela-tionships)Faster for associative data setsCan scale to large data sets without joinsEvery element contains a direct pointer to its adjacent elementTraverse graph to find the dataEfficient for representing social networks and storing sparse dataExamples: Neo4j [15], Infinite Graph [17]Karamjit Kaur (TU) NoSQL Databases April 2013 16 / 27
  17. 17. Karamjit Kaur (TU) NoSQL Databases April 2013 17 / 27
  18. 18. NoSQL DisadvantagesNot mature enoughLack of supportStandardization pendingLess expertiseRequire redesigningReluctance of enterprises to adopt non-ACID databasesKaramjit Kaur (TU) NoSQL Databases April 2013 18 / 27
  19. 19. New SQL Databases = SQL + NoSQL DatabasesTerm coined by research group named ’451’ in their famous report,“NoSQL, NewSQL and Beyond” [18]Preserve SQLUses traditional ACID notion for transactionsOffer high performanceOffer scale-out, shared-nothing architecture, capable of running on alarge number of nodes without creating bottle-necksExamples: VoltDB [19], Xeround [20], NuoDB [21], JustOneDB [22]etc.Karamjit Kaur (TU) NoSQL Databases April 2013 19 / 27
  20. 20. One Size Does Not Fit AllRedis for user sessions: Rapid access for reads and writesRDBMS for financial data: Transactional updates and reportingRiak for shopping cart: High availability across multiple locationsNeo4J for recommendations: Rapidly traverse links between friends,product purchases and ratingsMongoDB for product catalog: Lots of reads, infrequent writesCassandra for analytics and user activity logs: High volume of writeson multiple nodesKaramjit Kaur (TU) NoSQL Databases April 2013 20 / 27
  21. 21. Karamjit Kaur (TU) NoSQL Databases April 2013 21 / 27
  22. 22. References I[1] F. Chang, J. Dean, S. Ghemawat, W. C. Hsieh, D. A. Wallach,M. Burrows, T. Chandra, A. Fikes, and R. E. Gruber, “Bigtable: adistributed storage system for structured data,” in Proc. of the 7thsymposium on Operating systems design and implementation OSDI’06, Berkeley, CA, 2006, pp. 205–218.[2] G. DeCandia, D. Hastorun, M. Jampani, G. Kakulapati,A. Lakshman, A. Pilchin, S. Sivasubramanian, P. Vosshall, andW. Vogels, “Dynamo: Amazon’s highly available key-value store,” inProc. of twenty-first ACM SIGOPS symposium on Operating systemsprinciples, Stevenson, Washington, USA, 2007.[3] (2010) The CouchDB website. [Online]. Available:http://couchdb.apache.org/Karamjit Kaur (TU) NoSQL Databases April 2013 22 / 27
  23. 23. References II[4] D. Arseneau. (2010, Aug.) 10 things you should know about nosqldatabases. [Online]. Available: http://www.techrepublic.com/blog/10things/10-things-you-should-know-about-nosql-databases/1772[5] Project voldemort: A distributed database. [Online]. Available:http://project-voldemort.com/[6] A. Lakshman and P. Malik, “Cassandra - a decentralized structuredstorage system,” Technical Report, Cornell University, 2009.[7] The HBase website. [Online]. Available: http://hbase.apache.org/[8] The mongodb’s website. [Online]. Available:http://www.mongodb.org/[9] The oracle website. [Online]. Available: http://www.oracle.com/technetwork/products/nosqldb/overview/index.htmlKaramjit Kaur (TU) NoSQL Databases April 2013 23 / 27
  24. 24. References III[10] C. Strozzi. Nosql a relational database management system. [Online].Available: http://www.strozzi.it/cgi-bin/CSA/tw7/I/en US/nosql/Home%20Page[11] E. Evans. (2009, May) Nosql 2009. [Online]. Available:http://blog.sym-link.com/2009/05/12/nosql 2009.html[12] D. Pritchett, “Base: An acid alternative,” ACM Queue, pp. 48–55,May 2008.[13] T. Hoff. (2009, Aug.) An unorthodox approach to database design:The coming of the shard. [Online]. Available: http://highscalability.com/unorthodox-approach-database-design-coming-shard[14] S. Gilbert and N. Lynch, “Brewer’s conjecture and the feasibility ofconsistent, available, partition-tolerant web services,” ACM SIGACTNews, vol. 33, pp. 51–59, 2002.Karamjit Kaur (TU) NoSQL Databases April 2013 24 / 27
  25. 25. References IV[15] (2006, Nov.) The neo database. [Online]. Available:http://dist.neo4j.org/neo-technology-introduction.pdf[16] J. Zawodny, “Redis: Lightweight key/value store that goes the extramile,” Linux Magazine, Aug. 2009.[17] The infinite graph website. [Online]. Available:http://www.infinitegraph.com/[18] M. Aslett. (2011, Apr.) Nosql, newsql and beyond: The answer tosprained relational databases. [Online]. Available:http://blogs.the451group.com/information management/2011/04/15/nosql-newsql-and-beyond/[19] The voltdb website. [Online]. Available: http://voltdb.com/[20] The xeround website. [Online]. Available: http://xeround.com/[21] The nuodb website. [Online]. Available: http://www.nuodb.com/Karamjit Kaur (TU) NoSQL Databases April 2013 25 / 27
  26. 26. References V[22] The JustOneDB website. [Online]. Available:http://www.justonedb.com/Karamjit Kaur (TU) NoSQL Databases April 2013 26 / 27
  27. 27. Thank YouKaramjit Kaur (TU) NoSQL Databases April 2013 27 / 27

×