Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
SQL vs. NoSQLData in the world of social media            Jon Limjap          Microsoft MVP for C#
Who am I?• I’m Jon   – Blog: http://dotnet.kapenilattex.com  – Twitter: @lattex• Does anybody remember…• I’m a developer,...
Why not SQL?
Why not SQL?• Internet scale• 100s of millions of concurrent users• Massive data collections – Terabytes to  Petabytes of ...
Why not SQL?
NoSQL doesn’t mean no data :p• It’s not Anti SQL or absolutely no SQL• N(ot) O(nly) SQL• Non-relational Databases
What is NoSQL good for?• High Availability• High Performance• Horizontal Scalability
Types of NoSQL Data Stores                   Document                                      Key-ValueColumn Sets         Or...
Some NoSQL Data Stores
j = { name : "mongo" }k = { x : 3 }db.things.insert( j )db.things.insert( k )db.things.find(){ "_id" :ObjectId("4c2209f9f3...
for (var i = 1; i <= 10; i++) db.things.insert( { x : 4 , j : i } )db.things.find(){   "_id"   :   ObjectId("4c2209f9f3924...
db.things.find({name: "mongo"}){ "_id" :ObjectId("4c2209f9f3924d31102bd84a"), "name" : "mongo" }
What’s the big deal?
ACID vs. BASE
ACID vs. BASE• ACID:  – Atomic: Every transaction should succeed else    transaction is roled back  – Consistent: Every tr...
ACID vs. BASE• BASE  – Basic Availability: The data store should be up all    of the time  – Soft state: The data store ca...
Where shouldn’t I use NoSQL?
Conclusion• SQL is great when you need ACID• NoSQL is great when you need BASE• Choose the right tool for the right job
Thank You!• Blog: http://dotnet.kapenilattex.com• Twitter: @lattex
References• John D. Cook – ACID versus BASE for database transactions  http://www.johndcook.com/blog/2009/07/06/brewer-cap...
Próxima SlideShare
Cargando en…5
×

SQL vs NoSQL

927 visualizaciones

Publicado el

A short presentation describing the difference between SQL and NoSQL

  • Sé el primero en comentar

SQL vs NoSQL

  1. 1. SQL vs. NoSQLData in the world of social media Jon Limjap Microsoft MVP for C#
  2. 2. Who am I?• I’m Jon  – Blog: http://dotnet.kapenilattex.com – Twitter: @lattex• Does anybody remember…• I’m a developer, not a DBA• I’ve worked on mainframe, desktop, web, and mobile• I’m a member of MSDEV.PH / PHISSUG / DevCon
  3. 3. Why not SQL?
  4. 4. Why not SQL?• Internet scale• 100s of millions of concurrent users• Massive data collections – Terabytes to Petabytes of data• 24/7 across the globe
  5. 5. Why not SQL?
  6. 6. NoSQL doesn’t mean no data :p• It’s not Anti SQL or absolutely no SQL• N(ot) O(nly) SQL• Non-relational Databases
  7. 7. What is NoSQL good for?• High Availability• High Performance• Horizontal Scalability
  8. 8. Types of NoSQL Data Stores Document Key-ValueColumn Sets Oriented Store (JSON) XML Graph BLOBs Object Etc…
  9. 9. Some NoSQL Data Stores
  10. 10. j = { name : "mongo" }k = { x : 3 }db.things.insert( j )db.things.insert( k )db.things.find(){ "_id" :ObjectId("4c2209f9f3924d31102bd84a"), "name" :"mongo" }{ "_id" :ObjectId("4c2209fef3924d31102bd84b"), "x" : 3 }
  11. 11. for (var i = 1; i <= 10; i++) db.things.insert( { x : 4 , j : i } )db.things.find(){ "_id" : ObjectId("4c2209f9f3924d31102bd84a"), "name" : "mongo" }{ "_id" : ObjectId("4c2209fef3924d31102bd84b"), "x" : 3 }{ "_id" : ObjectId("4c220a42f3924d31102bd856"), "x" : 4, "j" : 1 }{ "_id" : ObjectId("4c220a42f3924d31102bd857"), "x" : 4, "j" : 2 }{ "_id" : ObjectId("4c220a42f3924d31102bd858"), "x" : 4, "j" : 3 }{ "_id" : ObjectId("4c220a42f3924d31102bd859"), "x" : 4, "j" : 4 }{ "_id" : ObjectId("4c220a42f3924d31102bd85a"), "x" : 4, "j" : 5 }{ "_id" : ObjectId("4c220a42f3924d31102bd85b"), "x" : 4, "j" : 6 }{ "_id" : ObjectId("4c220a42f3924d31102bd85c"), "x" : 4, "j" : 7 }{ "_id" : ObjectId("4c220a42f3924d31102bd85d"), "x" : 4, "j" : 8 }{ "_id" : ObjectId("4c220a42f3924d31102bd85e"), "x" : 4, "j" : 9 }{ "_id" : ObjectId("4c220a42f3924d31102bd85f"), "x" : 4, "j" : 10 }
  12. 12. db.things.find({name: "mongo"}){ "_id" :ObjectId("4c2209f9f3924d31102bd84a"), "name" : "mongo" }
  13. 13. What’s the big deal?
  14. 14. ACID vs. BASE
  15. 15. ACID vs. BASE• ACID: – Atomic: Every transaction should succeed else transaction is roled back – Consistent: Every transaction leaves database in a valid (consistent) state – Isolation: Transactions don’t interfere with each other – Durable: Completed transactions persist, even when servers restart
  16. 16. ACID vs. BASE• BASE – Basic Availability: The data store should be up all of the time – Soft state: The data store can be cached somewhere else if the data store is not available – Eventual consistency: The data store can have conflicting transactions, but should eventually reach a valid state
  17. 17. Where shouldn’t I use NoSQL?
  18. 18. Conclusion• SQL is great when you need ACID• NoSQL is great when you need BASE• Choose the right tool for the right job
  19. 19. Thank You!• Blog: http://dotnet.kapenilattex.com• Twitter: @lattex
  20. 20. References• John D. Cook – ACID versus BASE for database transactions http://www.johndcook.com/blog/2009/07/06/brewer-cap- theorem-base/• Getting Started with MongoDB Development – http://docs.mongodb.org/manual/tutorial/getting-started/• Michael Rys – SQL and NoSQL Are Two Sides of the Same Coin – http://www.slideshare.net/MichaelRys/sql-and- nosql-are-two-sides-of-the-same-coin-strata-2012• Vamshi Krishna Reddy Vangapally – No sql databases - http://www.slideshare.net/vamshi4001/no-sql-databases• Venu Anuganti – SQL, NoSQL, BigData in Data Architecture - http://www.slideshare.net/vanuganti/sql-nosql-bigdata-in- data-architecture

×