SLQ vs NOSQL - friends or foes

1,400 views
1,333 views

Published on

A light introduction to recent discussion revolving around NOSQL and relational databases
http://www.slideshare.net/miguelgaraujo

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,400
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
61
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • SLQ vs NOSQL - friends or foes

    1. 1. SQL vs NOSQLfriends or foes Pedro Gomes & Miguel Araújo 8 February - Braga Geek Nights
    2. 2. SQL“select maturity, experience, consistency from real_world where age > 40;”• Relational Model born in 1970, defined by Codd• Data model with simple interface for the common user• Efficient storage of data• Dozens of mature solutions (most popular commercial and open source databases currently in use are based on the relational model)• Standard/Unified model
    3. 3. NOSQL“select fun, profit from real_world where relational=false;”• Movement constituted by several types of database engines that break a 40 year monopoly• With origins that can be tracked into the 60s, this movement gained visibility after 2000.• Defined by a controversial term this movement gained traction thanks to the web giants Google, Amazon, Yahoo and others• Between closed and open source solutions, we can such names as Google BigTable, Facebook Cassandra or LinkedIn Voldemort
    4. 4. SQLPros• ACID transactions for OLTP• Maturity and stability• Years of expertise and developing• SQL language• Ad-hoc queries. If you need to answer real-time questions about your data that you can’t predict in advance• Data integrity. NOSQL systems rely on applications to enforce data integrity where SQL uses a declarative approach
    5. 5. SQLCons• Expensive and/or unnatural scalability• Used as a solution to all problems it cans lead to low performance (10x slower)• Static schemes not natural in a more and more dynamical world• The strict consistency can be unnatural under failure, on high latency communications (e.g. between Data centers) and on disconnected devices.
    6. 6. NOSQLPros• Dynamic schemas• Adaptable consistency models• Architectures built for scale and availability• Friendly web APIs• Easier maintainability and administration
    7. 7. NOSQLCons• Beta, alpha, 0.X version...• No SQL• User coded consistence, and simple operations can sometimes be verbose• They sometimes lack monitoring and integration tools• Difficult to master
    8. 8. SQLUsed where• Stack Overflow• Google• Facebook• Twitter• Amazon• eBay
    9. 9. NOSQLUsed where• Facebook• Twitter• Google• Amazon• Mozilla• Netflix
    10. 10. Forget SQL vs NOSQL!
    11. 11. What should I use?For your personal website or small project‣ Doesn’t matter! Use MongoDB or other document store if you don’t like SQL Use MySQL or PostgreSQL if you are more familiar with such RDBMS Try something new
    12. 12. What should I use?For electronic commerce or another OLTP scenarios‣ Use a classic RDBMS of your choice: When you need to scale use sharding, replication or memcache Other valid options offer ACID transactions In memory VoltDB Non relational options: Berkeley DB, Infinispan Object oriented: ZODB,Db40
    13. 13. What should I use?For data mining and data warehousing‣ Use a column oriented database It can lead to a performance gain of 10X Zynga currently uses Vertica Other options include MonetDB and LucidDB
    14. 14. What should I use?For large scale data with a strong consistency model‣ Use HBase The main contributors to the project include Yahoo, Facebook, Stubleupon and Cloudera Great for HDFS/Hadoop integration
    15. 15. What should I use?For large scale real time analytics‣ Use a Dynamo style database With a Key/Value model: Riak With a BigTable model: Cassandra
    16. 16. Different solutions for different Graph databases FlockBD FlockDB Hacker’s database: Redis
    17. 17. Questions? •
    18. 18. References• http://highscalability.com/blog/2010/12/6/what-the-heck-are-you-actually-using-nosql-for.html• http://databasecolumn.vertica.com/database-innovation/mapreduce-a-major-step-backwards/• http://blog.mozilla.com/data/2010/05/18/riak-and-cassandra-and-hbase-oh-my/• http://shouldibeworriedaboutscaling.info/• https://docs.google.com/present/view?id=0Acbfb57m7svVZGRicDd2ZjJfMTFocG10andmeA&hl=en• http://lwn.net/Articles/376626/• http://techblog.netflix.com/2011/01/nosql-at-netflix.html• http://nosql.mypopescu.com/• http://nosql-databases.org/• One Size Fits All? – Part 2: Benchmarking Results (Stonebraker, Çetintemel, et all

    ×