(No)SQLRadu Vunvuleavunvulear@gmail.comhttp://vunvulearadu.blogspot.com
{“name” : “Radu Vunvulea,“company” : “iQuest”,“userType” : “enthusiastic”“technologies” : [ “.NET”, “JS”, “Azure”, “Web”,“...
SQL
In the early 1980s, relational databases began tobe defined. One of the proponents of relationaldatabase theory was Edgar ...
Relevant rules• Relational facilities• Information is represented only in one way• All data must be accessible• All views ...
• Where from is this name?NoSQL
• Where from is this name?• Non-relational• Web-scale databaseNoSQL
• What is NoSQLWhat is NoSQL
Any database that is not a RelationalDatabase!What is NoSQL?
Any database that is not a RelationalDatabase!Simple like this What is NoSQL?
• Non-Relational Database• But is to long• Is not so cool• This name would not caught onA better name would be
• Non-Relational Database• But is to long• Is not so cool• This name would not caught on…so we are back toNoSQLA better na...
• More and more connections between data• Everything is linked to something more… andmore… and so on• Hyperlinks• Tags• RS...
• From a flat architectureDatabase trends – 2 ArchitectureDBApp
• From a flat architecture to a couple oneDatabase trends – 2 ArchitectureDBAppApp App
• From a flat architecture to a couple one and nowwe have a decoupled one based on servicesDatabase trends – 2 Architectur...
• From web 2.0 the structure of data are don’thave so fixed structure (is more flexible)• How many phone number a person c...
• From web 2.0 the structure of data are don’thave so fixed structure (is more flexible)• How many phone number a person c...
• 2006 - 160• 2008 – 390• 2010 – 998• 2012 – 2000+• First column is in years• Second column is in … ?Database trends – 4 D...
Database trends – 4 Data Size
What we needRelational Database PerformanceRDBMSperformance
So, we end up with
So, we end up withNon-Relational Database
1. Key-Value2. Document3. Big Table4. Graph DBCategories of NoSQL Database
• Design to handle massive load• Can scale to massive amounts of data• Based on Key-Value collections• Dynamic ring partit...
Key-Value
• Like column oriented Relational Database,but with a twist• Tables similar to RDBMS, but handle semi-structured• Based on...
• Similar with Key-Value pair but• DB knows what the Value is• Inspired by Lotus Notes• Data model:• Collections of Key-Va...
• Focus in modeling the structure of data• The interconnectivity• Scales on the complexity of data• Inspired by mathematic...
• Not part of NoSQL community• Still a good solution for a lot of problems• Focuses on matching OOP paradigm• Easy to use•...
• Easy to deploy• No OS management• Scaling• Monitoring• Publish from different source controls• Support different technol...
ScalingComplexitySizeKeyValueBigTableDoc.Graph
How to query it?
• REST• GQL (SQL Like)• SPARQL• Gremlin• API’sHow to query it?
• Replication• Write to many• Master/Slave replication• Master reelection• Failover• Either by another machine taking over...
• Most NoSQL sacrifice Consistency• Some NoSQL don’t have Transactions• Atom single operations• Because of this some opera...
• NoSQL is the BatmanPerformance
• NoSQL is the Batman• Durability is sacrificed• On-disk durability• Multiple-replicas durabilityPerformance
One solution for all our problemes?Web Sites
One solution for all our problems?
• Why• Dynamic query• Content is stored as documents• Big database that need to be very fast• Where• Properties are stored...
• Why• When you make a lot of updates and insert• Reading data is not the main scope of the database(writes are faster tha...
• Why• For data that don’t change very often (insertand read and NOT update)• We have a lot of predefined queries and wene...
• Why• When you do data analyzing• Where• Works great in combination with HadoopHBase
• Why• When we need high concurrency• When the latency is very low and we wantthe latency to be minimal• Where• Backend of...
• Why• When we need to make a lot of updates• When the database is not too big and can bekept in memory• Where• Can be use...
Redis
• Facebook• Hbase – Facebook messages• Scribe - Real-time click logs• Hive – SQLqueries -> MapReducejobs• Hadoop• Web anal...
• Twitter• Hadoop – Analytics• Hbase – People search• Scribe – Log collection framework• FlockDB – Social graph analysisEx...
QuestionAnswers
THE ENDRadu Vunvuleavunvulear@gmail.comhttp://vunvulearadu.blogspot.com
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
NoSQL
Upcoming SlideShare
Loading in …5
×

NoSQL

2,225 views

Published on

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,225
On SlideShare
0
From Embeds
0
Number of Embeds
174
Actions
Shares
0
Downloads
67
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

NoSQL

  1. 1. (No)SQLRadu Vunvuleavunvulear@gmail.comhttp://vunvulearadu.blogspot.com
  2. 2. {“name” : “Radu Vunvulea,“company” : “iQuest”,“userType” : “enthusiastic”“technologies” : [ “.NET”, “JS”, “Azure”, “Web”,“Mobile”, “SL” ],“blog” : “vunvulearadu.blogspot.com”,“email” : ”vunvulear@gmail.com”,“socialMedia” :{“twitter” : “@RaduVunvulea”,“fb” : “radu.vunvulea”}}Who am I?
  3. 3. SQL
  4. 4. In the early 1980s, relational databases began tobe defined. One of the proponents of relationaldatabase theory was Edgar F. Codd, whopublished 13 rules that set out to define arelational database. This was the beginning ofthe formalized scientific groundwork done to laydown specific rules for the existence of therelational aspects of a database.Sursa: http://www.ehow.com
  5. 5. Relevant rules• Relational facilities• Information is represented only in one way• All data must be accessible• All views that are theoretically updatablemust be updatable by the system• Insert, Update, Delete for any retrieval sets
  6. 6. • Where from is this name?NoSQL
  7. 7. • Where from is this name?• Non-relational• Web-scale databaseNoSQL
  8. 8. • What is NoSQLWhat is NoSQL
  9. 9. Any database that is not a RelationalDatabase!What is NoSQL?
  10. 10. Any database that is not a RelationalDatabase!Simple like this What is NoSQL?
  11. 11. • Non-Relational Database• But is to long• Is not so cool• This name would not caught onA better name would be
  12. 12. • Non-Relational Database• But is to long• Is not so cool• This name would not caught on…so we are back toNoSQLA better name would be
  13. 13. • More and more connections between data• Everything is linked to something more… andmore… and so on• Hyperlinks• Tags• RSS• RDF• Attributes• User contentDatabase trends – 1 Connections
  14. 14. • From a flat architectureDatabase trends – 2 ArchitectureDBApp
  15. 15. • From a flat architecture to a couple oneDatabase trends – 2 ArchitectureDBAppApp App
  16. 16. • From a flat architecture to a couple one and nowwe have a decoupled one based on servicesDatabase trends – 2 ArchitectureDBAppDBAppDBApp
  17. 17. • From web 2.0 the structure of data are don’thave so fixed structure (is more flexible)• How many phone number a person could havein 1970?Database trends – 3 No fix structure
  18. 18. • From web 2.0 the structure of data are don’thave so fixed structure (is more flexible)• How many phone number a person could havein 1970? And NOW …Database trends – 3 No fix structure
  19. 19. • 2006 - 160• 2008 – 390• 2010 – 998• 2012 – 2000+• First column is in years• Second column is in … ?Database trends – 4 Data Size
  20. 20. Database trends – 4 Data Size
  21. 21. What we needRelational Database PerformanceRDBMSperformance
  22. 22. So, we end up with
  23. 23. So, we end up withNon-Relational Database
  24. 24. 1. Key-Value2. Document3. Big Table4. Graph DBCategories of NoSQL Database
  25. 25. • Design to handle massive load• Can scale to massive amounts of data• Based on Key-Value collections• Dynamic ring partition• Dynamic replication• Ex.: DynoiteKey-Value
  26. 26. Key-Value
  27. 27. • Like column oriented Relational Database,but with a twist• Tables similar to RDBMS, but handle semi-structured• Based on Google’s BigTable paper• Data mode:• Columns – columns family -> ACL• Dataums keyed by - row, column, time, index• Row-range – table -> distribution• Ex.: CassandraBig Table
  28. 28. • Similar with Key-Value pair but• DB knows what the Value is• Inspired by Lotus Notes• Data model:• Collections of Key-Value collections• Documents are often versioned• Ex.: MongoDBDocument Database
  29. 29. • Focus in modeling the structure of data• The interconnectivity• Scales on the complexity of data• Inspired by mathematical Graph Theory• Data model:• Property Graph -> Nodes• Relationships/Edges between Nodes• Key-Value pair on both• Possible Edge Labels and/or Node/Edge Types• Ex.: Neo4jGraph Database
  30. 30. • Not part of NoSQL community• Still a good solution for a lot of problems• Focuses on matching OOP paradigm• Easy to use• Simple to integrate• Neither gain nor loosing tractionObject Database
  31. 31. • Easy to deploy• No OS management• Scaling• Monitoring• Publish from different source controls• Support different technologies (PHP, node.js,.NET)• Low cost support – shared mode• Reserved mode – dedicated instance• Each site run in an isolated environmentWeb Sites
  32. 32. ScalingComplexitySizeKeyValueBigTableDoc.Graph
  33. 33. How to query it?
  34. 34. • REST• GQL (SQL Like)• SPARQL• Gremlin• API’sHow to query it?
  35. 35. • Replication• Write to many• Master/Slave replication• Master reelection• Failover• Either by another machine taking over• Client knowingAvailability
  36. 36. • Most NoSQL sacrifice Consistency• Some NoSQL don’t have Transactions• Atom single operations• Because of this some operations areimpossible to implementCorrectness
  37. 37. • NoSQL is the BatmanPerformance
  38. 38. • NoSQL is the Batman• Durability is sacrificed• On-disk durability• Multiple-replicas durabilityPerformance
  39. 39. One solution for all our problemes?Web Sites
  40. 40. One solution for all our problems?
  41. 41. • Why• Dynamic query• Content is stored as documents• Big database that need to be very fast• Where• Properties are stored like query and index• Can be used for voting system, CMS or commentstorageMongoDB
  42. 42. • Why• When you make a lot of updates and insert• Reading data is not the main scope of the database(writes are faster than reads)• Content is stored as column• High availability• Where• Can be used with success for logging• Financial industry or any place where we work with alot of data that is needed to be written• Basket of an e-commerce applicationCassandra
  43. 43. • Why• For data that don’t change very often (insertand read and NOT update)• We have a lot of predefined queries and weneed versioning support• Where• Is a great database for CMS and CRM.CouchDB
  44. 44. • Why• When you do data analyzing• Where• Works great in combination with HadoopHBase
  45. 45. • Why• When we need high concurrency• When the latency is very low and we wantthe latency to be minimal• Where• Backend of a game or a system that offerdata in real timeMembase
  46. 46. • Why• When we need to make a lot of updates• When the database is not too big and can bekept in memory• Where• Can be used when we have a real timecommunication, for example a stock marketwith pricesRedis
  47. 47. Redis
  48. 48. • Facebook• Hbase – Facebook messages• Scribe - Real-time click logs• Hive – SQLqueries -> MapReducejobs• Hadoop• Web analytics warehouse• Distribute datastore• MySQLbackupExamples
  49. 49. • Twitter• Hadoop – Analytics• Hbase – People search• Scribe – Log collection framework• FlockDB – Social graph analysisExamples
  50. 50. QuestionAnswers
  51. 51. THE ENDRadu Vunvuleavunvulear@gmail.comhttp://vunvulearadu.blogspot.com

×