Scanning the Internet for External Cloud Exposures via SSL Certs
SLQ vs NOSQL - friends or foes
1. SQL vs NOSQL
friends 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. SQL
Pros
• 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. SQL
Cons
• 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. NOSQL
Pros
• Dynamic schemas
• Adaptable consistency models
• Architectures built for scale and availability
• Friendly web APIs
• Easier maintainability and administration
7. NOSQL
Cons
• 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
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