SLQ vs NOSQL - friends or foes

Uploaded on

A light introduction to recent discussion revolving around NOSQL and relational databases …

A light introduction to recent discussion revolving around NOSQL and relational databases

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n


  • 1. SQL vs NOSQLfriends or foes Pedro Gomes & Miguel Araújo 8 February - Braga Geek Nights
  • 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. 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. 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. 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. NOSQLPros• Dynamic schemas• Adaptable consistency models• Architectures built for scale and availability• Friendly web APIs• Easier maintainability and administration
  • 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. SQLUsed where• Stack Overflow• Google• Facebook• Twitter• Amazon• eBay
  • 9. NOSQLUsed where• Facebook• Twitter• Google• Amazon• Mozilla• Netflix
  • 10. Forget SQL vs NOSQL!
  • 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. 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. 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. 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. 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. Different solutions for different Graph databases FlockBD FlockDB Hacker’s database: Redis
  • 17. Questions? •
  • 18. References•••••••••• One Size Fits All? – Part 2: Benchmarking Results (Stonebraker, Çetintemel, et all