SlideShare a Scribd company logo
1 of 48
Download to read offline
2014 © Trivadis
BASEL BERN BRUGG LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA

2014 © Trivadis
SQL versus NoSQL
Guido Schmutz
Philipp Salvisberg
3rd July 2014
SQL versus NoSQL
1
2014 © Trivadis
Guido Schmutz
§  Working for Trivadis for more than 17 years
§  Oracle ACE Director for Fusion Middleware and SOA
§  Co-Author of different books
§  Consultant, Trainer Software Architect for Java, Oracle, SOA and
Big Data / Fast Data
§  Member of Trivadis Architecture Board
§  Technology Manager @ Trivadis
§  More than 25 years of software development
experience
§  Contact: guido.schmutz@trivadis.com
§  Blog: http://guidoschmutz.wordpress.com
§  Twitter: gschmutz
3rd July 2014
SQL versus NoSQL
2
2014 © Trivadis
Philipp Salvisberg
§  With Trivadis since April 2000
§  Senior Principal Consultant, Partner
§  Member of the Board of Directors
§  philipp.salvisberg@trivadis.com
§  www.salvis.com/blog
§  @phsalvisberg
§  Member of the
§  Main focus on database centric development with Oracle DB
§  Application Development
§  Business Intelligence
§  Application Performance Management
§  Over 20 years experience in using Oracle products
3rd July 2014
SQL versus NoSQL
3
2014 © Trivadis
Agenda
1.  Motivation
2.  Overview of SQL and NoSQL Data Stores
3.  Use Cases – Let's Get Ready to Rumble
4.  Recommended Reads
5.  Core Messages
3rd July 2014
SQL versus NoSQL
4
#Schwabengipfel14 #SQL
#Schwabengipfel14 #NoSQL
#Schwabengipfel14 #SQL #NoSQL
2014 © Trivadis
Understanding the Merits
3rd July 2014
SQL versus NoSQL
5
Why NoSQL?
Can do everything with RDBMSs!
Having performance, scalability,
transactions and SQL.
A key-value store is adequate for key
lookups and easier to understand than
a RDBMS.
RDBMSs do not scale as good as
NoSQL systems like Google’s
BigTable.
RDBMSs provide a common interface
with SQL, transactions, and relational
schema.
Some applications require a flexible
schema.
Adding new attributes at runtime in
RDBMSs is typically not possible.…
…
Source: Scalable SQL and NoSQL Data Stores, Rick Catell, 2010
2014 © Trivadis
Agenda
1.  Motivation
2.  Overview of SQL and NoSQL Data Stores
3.  Use Cases – Let's Get Ready to Rumble
4.  Recommended Reads
5.  Conclusion
3rd July 2014
SQL versus NoSQL
6
2014 © Trivadis
SQL Data Stores
§  Relational Model
§  Standardized, SQL:2011 is the 7th major revision since SQL-86
§  9 parts, more than 4000 pages
§  But no single database implements all standards/features
§  Rich set of features
§  Incl. SQL/PSM, SQL/MED, SQL/XML, SQL/RPR, Temporal Features
§  Incl. User-defined Types and Collection Types (since SQL:1999)
§  ACID Transactions
§  Atomicity: all or nothing
§  Consistency: from valid state to valid state considering constraints, triggers, …
§  Isolation: result is not affected through concurrent execution
§  Durability: committed data stays available after crash, power loss or errors
§  Good support by different languages, frameworks and tools
§  Good understanding of basic concepts by IT professionals
3rd July 2014
SQL versus NoSQL
7
2014 © Trivadis
NoSQL Definition
§  Next Generation Databases mostly addressing some of the points:
§  being non-relational,
§  distributed,
§  open-source and
§  horizontally scalable.
§  Often more characteristics apply such as:
§  schema-free,
§  easy replication support,
§  simple API,
§  eventually consistent / BASE (not ACID),
§  a huge amount of data
§  and more.
§  The misleading term "nosql" (the community now translates it mostly with
"not only sql") should be seen as an alias to something like the definition
above
3rd July 2014
SQL versus NoSQL
8
Source: http://nosql-database.org
BASE
§  Basically Available: Availability is
more important than consistency
§  Soft State: Higher availability results
in an eventual consistent state
§  Eventually Consistent: If no new
updates are made to a given data
item, eventually all accesses to that
item will return the last updated
value
2014 © Trivadis
Brewer's CAP Theorem
Any networked shared-data system can have at most two of the three
desirable properties:
§  Consistency
All of the nodes see the same data at
the same time, regardless of
where the data is stored
§  Availability
Node failures do not prevent
survivors from continuing to
operate
§  Network Partition tolerance
The system continues to operate
despite arbitrary message loss
3rd July 2014
SQL versus NoSQL
9
Availability
Consistency
Network
Partition
Tolerance
n/a
CA CP
AP
2014 © Trivadis
Data Store Positioning
3rd July 2014
SQL versus NoSQL
10
Scalability
Standardized Model, Tooling, Complexity
Key-value
Wide Column (Column Families / Extensible Records)
Document
Graph
Relational
SQL Comfort Zone
Multi Dimensional
2014 © Trivadis
Agenda
1.  Motivation
2.  Overview of SQL and NoSQL Data Stores
3.  Use Cases – Let's Get Ready to Rumble
4.  Recommended Reads
5.  Core Messages
3rd July 2014
SQL versus NoSQL
11
2014 © Trivadis
3rd July 2014
SQL versus NoSQL
12
Round 1
Smart Meter
2014 © Trivadis
Smart Meter – Introduction
§  Data is captured from 2 million smart meters
(1 main sensor, 10 optional sub-sensors, e.g. fridge, stove, dish-washer,
wash-machine, TV, computer, …)
§  One smart meter per household
§  Measures the energy consumption
§  Delivery interval between 1 second and 5 minutes
§  Every sensor measures and delivers the energy consumption per
second (kWh)
§  AP Characteristics (Consistency is not so important)
3rd July 2014
SQL versus NoSQL
13
2014 © Trivadis
Smart Meter – Customer Dashboard
3rd July 2014
SQL versus NoSQL
14
2014 © Trivadis
Smart Meter – Use Cases
§  Store sensor and its
sub-sensor values
§  2 Mio sensors, up to 10 sub-sensors
§  Energy consumption per second per sensor (kWh)
§  Delivery interval between 1 second and 5 minutes
§  Query usage per sensor and its
sub-sensors to visualize a
time series on a customer dashboard
§  Available in different granularities, values are aggregated in
-  Minute
-  Quarter of hour (15-minutes)
-  Hour
-  Day
§  Responsive UI
3rd July 2014
SQL versus NoSQL
15
Smart Meter
Store data of
millions of
sensors
Household
Dashboard
2014 © Trivadis
Cassandra NoSQL Datastore
•  Wide-Column Store
•  Developed at Facebook
•  Professional grade support from DataStax
•  Main Features
§  Real-Time
§  Highly Distributed
§  Support for Multiple Data Center
§  Highly Scalable
§  No Single Point of Failure
§  Fault Tolerant
§  Tunable Consistency
§  CQL – Cassandra Query
Language
3rd July 2014
SQL versus NoSQL
16
2014 © Trivadis
The Cassandra Way
3rd July 2014
SQL versus NoSQL
17
Household
 Bucket
AFG10 MINUTE-2014/03/5 sensor
 1 1 1 … 2 2 …
at
 11:59 11:58 11:57 … 11:59 11:58 …
kwh
 7.05 7.10 8.11 … 6.95 7.04 …
AFG10 QHOUR-2014/03 sensor
 1 1 1 … 2 2 …
at
 5T11:45 5T11:30 5T11:15 … 5T11:45 5T11:30 …
kwh
 105.78 104.73  102.29 … 102.78 101.61 …
AFG10 HOUR-2014/03 sensor
 1 1 1 … 2 2 …
at
 5T11 5T10 5T09 … 5T11 5T10 …
kwh
 423.00 410.33 395.99 … 598.32 522.12 …
AFG10 DAY-2014 sensor
 1 1 1 … 2 2 …
at
 5T 3T 2T … 5T 4T …
kwh
 10100.2 9892.2 8987.4 … 879.8 912,3 …
GXK11 MINUTE-2014/03/5 sensor
 1 1 1 … 2 2 …
at
 11:59 11:03 11:04 … 11:01 11:02 …
kwh
 100.10 90.88 95.00 … 92.50 88.50 …
Growth
24h * 60m * 11 sensor = 15’840 cols
30d * 24h * 4q * 11 sensor = 31’680 cols
30d * 24h * 11 sensor = 7’920 cols
365d * 11 sensor = 4’011 cols
2014 © Trivadis
The Cassandra Way
3rd July 2014
SQL versus NoSQL
18
2014 © Trivadis
The Cassandra Way
§  288 nodes on EC2
§  Over 1 Mio writes/sec => 60 Mio
writes/min
§  Rolling counters, always up to
date
3rd July 2014
SQL versus NoSQL
19
2014 © Trivadis
Relational Architecture
§  Active Data Guard Configuration
§  Global Data Services redirects
requests based on
§  Server loads
§  Request type (read/write)
§  Reader farm is geographically
spread
§  Failover/switchover to any node in
the reader farm is possible
§  Read services are not affected
§  Write services are unavailable for a
short period of time
§  Scalability of the write services is
the bottleneck of the system
3rd July 2014
SQL versus NoSQL
20
Global Data Services
Client
Read/Write Read-only Read-only Read-only
Sensor Sensor
2014 © Trivadis
Relational Data Model
§  SENSOR_READINGS_...
§  Index-organized tables
§  Daily partitions
§  JDBC Batch Merges
§  A transaction per sensor delivery
§  A single network roundtrip to merge 55
readings of a sensor delivery
§  Average between
-  0.4 Mio tpm (delivery per 5 minutes)
-  120 Mio tpm (delivery per second)
§  Top TPC-C Benchmark: 8.5 Mio tpm
§  Batch job to aggregate readings every
15 minutes, avoiding intermediate
results (updates)
§  Quarter of hour (5760 times a day)
§  Hour (24 times a day)
§  Day (once a day)
3rd July 2014
SQL versus NoSQL
21
2014 © Trivadis
Query Sensor Data – The SQL Way
Use aggregate tables to change granularity (quarter of hours, hours, days)
SELECT sensor_id, start_time, usage_kwh
FROM sensor_readings_minute
WHERE sensor_id IN (SELECT sensor_id
FROM sensors
WHERE sensor_id = :p_parent_sensor
OR parent_sensor_id = :p_parent_sensor)
AND start_time BETWEEN :p_from AND :p_to
ORDER BY sensor_id, start_time;
3rd July 2014
SQL versus NoSQL
22
2014 © Trivadis
3rd July 2014
SQL versus NoSQL
23
Smart Meter
0 – 1
2014 © Trivadis
3rd July 2014
SQL versus NoSQL
24
Round 2
Order Entry
2014 © Trivadis
Order Entry – Introduction
§  Orders are entered via GUI
§  Orders may be modified as long as the order status is "incomplete"
§  Order status is set to "complete" after a final approval
§  A lot of data is available in the system
§  Some sales volume analysis are wanted
§  CA Characteristics (network partition tolerance is not so important)
3rd July 2014
SQL versus NoSQL
25
2014 © Trivadis
Order Entry – Example
3rd July 2014
SQL versus NoSQL
26
2014 © Trivadis
Order Entry – Use Cases
§  Update the quantity in stock of
all ordered products
§  When order status changes
from "incomplete" to "complete"
§  When order status changes
from "complete" to "cancelled"
§  Ensure that the quantity in stock is always correct (no lost updates or similar)
§  Create a report to show all sales for a year per country
§  Create a report for the 5 top-selling products for a year
3rd July 2014
SQL versus NoSQL
27
Order Entry
Update
quantity in
Stock
Sales per
country
Top 5 selling
products
2014 © Trivadis
Relational Model
3rd July 2014
SQL versus NoSQL
28
2014 © Trivadis
Change Quantity in Stock – The SQL Way
Single Transaction
UPDATE ORDERS
SET order_status = :p_value_for_complete
WHERE order_id = :p_order_id;
MERGE INTO PRODUCTS t
USING (SELECT product_id,
SUM(quantity) AS quantity
FROM order_items
WHERE order_id = :p_order_id
GROUP BY product_id) s
ON (t.product_id = s.product_id)
WHEN MATCHED THEN
UPDATE SET t.quantity_on_stock =
t.quantity_on_stock - s.quantity;
COMMIT;
3rd July 2014
SQL versus NoSQL
29
2014 © Trivadis
Sales Volume per Country – The SQL Way
SELECT c.name as country_name,
SUM(i.quantity * i.unit_price) AS sales_volume
FROM order_items i
INNER JOIN orders o
ON o.order_id = i.order_id
INNER JOIN addresses a
ON a.address_id = o.shipping_address_id
INNER JOIN countries c
ON c.country_id = a.country_id
WHERE o.order_date >= DATE '2013-01-01'
AND o.order_date < DATE '2014-01-01'
GROUP BY c.name
ORDER BY 2 DESC;
3rd July 2014
SQL versus NoSQL
30
2014 © Trivadis
5 Top-Selling Products – The SQL Way
SELECT p.name AS product_name,
SUM(i.quantity * i.unit_price) AS sales_volume
FROM order_items i
INNER JOIN orders o
ON o.order_id = i.order_id
INNER JOIN products p
ON p.product_id = i.product_id
WHERE o.order_date > DATE '2013-01-01'
AND o.order_date <= DATE '2014-01-01'
AND o.order_status = :p_value_for_complete
GROUP BY p. name
ORDER BY 2 DESC
FETCH FIRST 5 ROWS WITH TIES;
3rd July 2014
SQL versus NoSQL
31
2014 © Trivadis
MongoDB NoSQL Store
•  Document Store
•  Developed by 10gen, now MongoDB Inc.
•  Professional grade support by MongoDB Inc.
•  Main Features
•  JSON Data Model with Dynamic Schemas
•  Auto-Sharding for Horizontal Scalability
•  Built-In Replication for High Availability
•  Rich Secondary Indexes, including geospatial and TTL indexes
•  Text Search
•  Aggregation Framework & Native MapReduce
3rd July 2014
SQL versus NoSQL
32
2014 © Trivadis
Customer
MongoDB Document Data Model (Aggregate Pattern)
3rd July 2014
SQL versus NoSQL
33
Order
Order Items
Order Item 1
Order Item 2
Order Item n
Shipping Address
Billing Address
Product
Category
Suppliers
Supplier 1
Address
Supplier n
Address
Supplier 1
Address
Address
2014 © Trivadis
Update Quantity in Stock – The MongoDB Way
ForEach orderItems.item {
db.products.update( { productId : 101 },
{ $inc : { quantity: -10 } },
{ multi: false }
);
}
3rd July 2014
SQL versus NoSQL
34
db.orders.find ( { orderId: 1} );
db.orders.update( { orderId: 1},
{ $set : { orderStatus: "COMPLETE" } },
{ multi: false } );
Transaction 1
Read Operation
Transaction 2 .. n
2014 © Trivadis
Sales Volume per Country – The MongoDB Way
var mapFunction = function() {
for (var idx = 0; idx < this.orderItems.length; idx++) {
var value = this.orderItems[idx].unitPrice *
this.orderItems[idx].quantity;
emit(this.shippingAddress.country, value);
} };
var reduceFunction = function(name, valuesPrices) {
return Array.sum(valuesPrices);
};
db.orders.mapReduce(mapFunction,
reduceFunction,
{ out : {inline:1},
query: { orderStatus: "COMPLETE",
orderDate: { $gt: ISODate("2014-01-01"),
$lt: ISODate("2014-04-01") }
}
});
3rd July 2014
SQL versus NoSQL
35
2014 © Trivadis
5 Top-Selling Products – The MongoDB Way
db.orders.aggregate([
{ $match : {
orderStatus: "COMPLETE",
orderDate: { $gt: ISODate("2014-01-01"),
$lt: ISODate("2014-04-01") }
} },
{ $unwind : "$orderItems" },
{ $project : { _id: 0,
productId: "$orderItems.productId",
total : { $multiply : ["$orderItems.quantity",
"$orderItems.unitPrice”] }
} },
{ $group : { _id: "$productId",
total : { $sum : "$total"} } },
{ $sort : { total: -1 }},
{ $limit : 5 }
])
3rd July 2014
SQL versus NoSQL
36
2014 © Trivadis
3rd July 2014
SQL versus NoSQL
37
Order Entry
1 – 1
2014 © Trivadis
3rd July 2014
SQL versus NoSQL
38
Round 3
Spotify
2014 © Trivadis
Spotify – Introduction
§  Music service which is available worldwide
§  Over 20’000’000 music tracks available
§  Millions of users
§  Each user has dozens of playlists
§  Many AP but also some CA use cases
3rd July 2014
SQL versus NoSQL
39
2014 © Trivadis
Spotify – Example
3rd July 2014
SQL versus NoSQL
40
2014 © Trivadis
Spotify – Use Cases
§  Playlist, Showing Ads, Following Artists …
are all uses cases which have to be
highly available, and accessible worldwide
§  Needs to be distributed to be fast
§  Service should be available even if a partition happen (due to network failure/
machine failure)
§  First time subscription and subscription renewal must be absolutely
consistent
§  Customer should only pay once!
3rd July 2014
SQL versus NoSQL
41
Spotify
Renewals
(payments)
Globally
available
playlists
2014 © Trivadis
Polyglot Persistence – SQL And NoSQL
3rd July 2014
SQL versus NoSQL
42
Spotify Platform
Playlists, Ads,
Followings
Subscriptions
and Payments
Wide-column
store RDBMS
2014 © Trivadis
3rd July 2014
SQL versus NoSQL
43
Spotify
2 – 2
Draw!
2014 © Trivadis
Agenda
1.  Motivation
2.  Overview of SQL and NoSQL Data Stores
3.  Use Cases – Let's Get Ready to Rumble
4.  Recommended Reads
5.  Core Messages
3rd July 2014
SQL versus NoSQL
44
2014 © Trivadis
Further information ...
3rd July 2014
SQL versus NoSQL
45
§  http://martinfowler.com/books/nosql.html
§  http://www.manning.com/mccreary/
§  http://highlyscalable.wordpress.com
§  http://nosql-database.org
§  http://db-engines.com/
2014 © Trivadis
Agenda
1.  Motivation
2.  Overview of SQL and NoSQL Data Stores
3.  Use Cases – Let's Get Ready to Rumble
4.  Recommended Reads
5.  Core Messages
3rd July 2014
SQL versus NoSQL
46
2014 © Trivadis
Core Messages
§  We will see a major consolation
in the NoSQL area
§  SQL is and stays important
§  Polyglot persistence will be part
of every solution design in the
near future
§  Enterprise capabilities are
required
§  Tooling (monitoring, backup &
recovery, data security, …)
§  Organization, skills
§  Opportunity for cloud based
solutions
3rd July 2014
SQL versus NoSQL
47
2014 © Trivadis
Questions and answers ...
2014 © Trivadis
BASEL BERN BRUGES LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA

Guido Schmutz
Technology Manager
Philipp Salvisberg
Senior Principal Consultant
3rd July 2014
SQL versus NoSQL
48

More Related Content

What's hot

SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.Denis Reznik
 
SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!Andraz Tori
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL AzureShy Engelberg
 
The Future of Distributed Databases
The Future of Distributed DatabasesThe Future of Distributed Databases
The Future of Distributed DatabasesNuoDB
 
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...Insight Technology, Inc.
 
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural LessonsCassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural LessonsDataStax
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAIDERA Software
 
2012 10 24_briefing room
2012 10 24_briefing room2012 10 24_briefing room
2012 10 24_briefing roomNuoDB
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseDataStax Academy
 
What is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremWhat is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremRahul Jain
 
What's new in SQL Server 2016
What's new in SQL Server 2016What's new in SQL Server 2016
What's new in SQL Server 2016James Serra
 
Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101IDERA Software
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GamePARIKSHIT SAVJANI
 
Enterprise Architect's view of Couchbase 4.0 with N1QL
Enterprise Architect's view of Couchbase 4.0 with N1QLEnterprise Architect's view of Couchbase 4.0 with N1QL
Enterprise Architect's view of Couchbase 4.0 with N1QLKeshav Murthy
 
SQL Server 2016 - Stretch DB
SQL Server 2016 - Stretch DB SQL Server 2016 - Stretch DB
SQL Server 2016 - Stretch DB Shy Engelberg
 
Oracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the uglyOracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the uglyJohn Kanagaraj
 

What's hot (20)

SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.
 
SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL Azure
 
The Future of Distributed Databases
The Future of Distributed DatabasesThe Future of Distributed Databases
The Future of Distributed Databases
 
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
 
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural LessonsCassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
 
2012 10 24_briefing room
2012 10 24_briefing room2012 10 24_briefing room
2012 10 24_briefing room
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
 
What is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremWhat is NoSQL and CAP Theorem
What is NoSQL and CAP Theorem
 
NoSQL and Couchbase
NoSQL and CouchbaseNoSQL and Couchbase
NoSQL and Couchbase
 
What's new in SQL Server 2016
What's new in SQL Server 2016What's new in SQL Server 2016
What's new in SQL Server 2016
 
Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the Game
 
RDBMS vs NoSQL
RDBMS vs NoSQLRDBMS vs NoSQL
RDBMS vs NoSQL
 
Sql vs. NoSql
Sql vs. NoSqlSql vs. NoSql
Sql vs. NoSql
 
Enterprise Architect's view of Couchbase 4.0 with N1QL
Enterprise Architect's view of Couchbase 4.0 with N1QLEnterprise Architect's view of Couchbase 4.0 with N1QL
Enterprise Architect's view of Couchbase 4.0 with N1QL
 
SQL Server 2016 - Stretch DB
SQL Server 2016 - Stretch DB SQL Server 2016 - Stretch DB
SQL Server 2016 - Stretch DB
 
Oracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the uglyOracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the ugly
 

Viewers also liked

Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQLRTigger
 
SQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesSQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesOsama Jomaa
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databasesJames Serra
 
NoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenNoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenLorenzo Alberton
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL DatabasesDerek Stainer
 
Thank you slideshow
Thank you slideshowThank you slideshow
Thank you slideshowRaj Singh
 
Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)Ontico
 
Maria db vs mysql
Maria db vs mysqlMaria db vs mysql
Maria db vs mysqlNitin KR
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLRichard Schneeman
 
Benchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible DisastersBenchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible DisastersMongoDB
 
Making sense of the Graph Revolution
Making sense of the Graph RevolutionMaking sense of the Graph Revolution
Making sense of the Graph RevolutionInfiniteGraph
 
Sgbd comerciales vs libres
Sgbd comerciales vs libresSgbd comerciales vs libres
Sgbd comerciales vs libresMadai Angeles
 
MySQL vs. NoSQL and NewSQL - survey results
MySQL vs. NoSQL and NewSQL - survey resultsMySQL vs. NoSQL and NewSQL - survey results
MySQL vs. NoSQL and NewSQL - survey resultsMatthew Aslett
 
Breaktherules 150909013617-lva1-app6892
Breaktherules 150909013617-lva1-app6892Breaktherules 150909013617-lva1-app6892
Breaktherules 150909013617-lva1-app6892Vera Kovaleva
 
150811pbdesignthinking 150811053102 lva1 app6892
150811pbdesignthinking 150811053102 lva1 app6892150811pbdesignthinking 150811053102 lva1 app6892
150811pbdesignthinking 150811053102 lva1 app6892Vera Kovaleva
 

Viewers also liked (20)

Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQL
 
SQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesSQL vs. NoSQL Databases
SQL vs. NoSQL Databases
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
 
NoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenNoSQL Databases: Why, what and when
NoSQL Databases: Why, what and when
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
 
SQL vs. NoSQL
SQL vs. NoSQLSQL vs. NoSQL
SQL vs. NoSQL
 
Thank you slideshow
Thank you slideshowThank you slideshow
Thank you slideshow
 
CouchDB
CouchDBCouchDB
CouchDB
 
Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)
 
Maria db vs mysql
Maria db vs mysqlMaria db vs mysql
Maria db vs mysql
 
Relational vs. Non-Relational
Relational vs. Non-RelationalRelational vs. Non-Relational
Relational vs. Non-Relational
 
Why MariaDB?
Why MariaDB?Why MariaDB?
Why MariaDB?
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQL
 
Benchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible DisastersBenchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible Disasters
 
Making sense of the Graph Revolution
Making sense of the Graph RevolutionMaking sense of the Graph Revolution
Making sense of the Graph Revolution
 
Presentacion BD NoSQL
Presentacion  BD NoSQLPresentacion  BD NoSQL
Presentacion BD NoSQL
 
Sgbd comerciales vs libres
Sgbd comerciales vs libresSgbd comerciales vs libres
Sgbd comerciales vs libres
 
MySQL vs. NoSQL and NewSQL - survey results
MySQL vs. NoSQL and NewSQL - survey resultsMySQL vs. NoSQL and NewSQL - survey results
MySQL vs. NoSQL and NewSQL - survey results
 
Breaktherules 150909013617-lva1-app6892
Breaktherules 150909013617-lva1-app6892Breaktherules 150909013617-lva1-app6892
Breaktherules 150909013617-lva1-app6892
 
150811pbdesignthinking 150811053102 lva1 app6892
150811pbdesignthinking 150811053102 lva1 app6892150811pbdesignthinking 150811053102 lva1 app6892
150811pbdesignthinking 150811053102 lva1 app6892
 

Similar to SQL vs. NoSQL

OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsAndrew Morgan
 
High Performance SSRS
High Performance SSRSHigh Performance SSRS
High Performance SSRSBert Wagner
 
OSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles JudithOSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles JudithNETWAYS
 
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, CriteoParis Open Source Summit
 
Tungsten Use Case: Modernizing Medicine, a SaaS solution running on Amazon AWS
Tungsten Use Case: Modernizing Medicine, a SaaS solution running on Amazon AWSTungsten Use Case: Modernizing Medicine, a SaaS solution running on Amazon AWS
Tungsten Use Case: Modernizing Medicine, a SaaS solution running on Amazon AWSContinuent
 
Achieving Gold Medal Performance From SQL Server
Achieving Gold Medal Performance From SQL ServerAchieving Gold Medal Performance From SQL Server
Achieving Gold Medal Performance From SQL ServerSQLDBApros
 
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACIDACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACIDAerospike, Inc.
 
Mmckeown hadr that_conf
Mmckeown hadr that_confMmckeown hadr that_conf
Mmckeown hadr that_confMike McKeown
 
Intro to Azure SQL database
Intro to Azure SQL databaseIntro to Azure SQL database
Intro to Azure SQL databaseSteve Knutson
 
Workshop - cqrs brief introduction
Workshop - cqrs brief introductionWorkshop - cqrs brief introduction
Workshop - cqrs brief introductionFrancesco Garavaglia
 
Azure + DataStax Enterprise (DSE) Powers Office365 Per User Store
Azure + DataStax Enterprise (DSE) Powers Office365 Per User StoreAzure + DataStax Enterprise (DSE) Powers Office365 Per User Store
Azure + DataStax Enterprise (DSE) Powers Office365 Per User StoreDataStax Academy
 
Building Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricBuilding Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricMats Kindahl
 
Sql azure cluster dashboard public.ppt
Sql azure cluster dashboard public.pptSql azure cluster dashboard public.ppt
Sql azure cluster dashboard public.pptQingsong Yao
 
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014Johnny Miller
 
Introduction to SQL Server Internals: How to Think Like the Engine
Introduction to SQL Server Internals: How to Think Like the EngineIntroduction to SQL Server Internals: How to Think Like the Engine
Introduction to SQL Server Internals: How to Think Like the EngineBrent Ozar
 
MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015
MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015
MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015Dave Stokes
 
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginnersKoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginnersTobias Koprowski
 

Similar to SQL vs. NoSQL (20)

SQL azure database for DBA
SQL azure database for DBASQL azure database for DBA
SQL azure database for DBA
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
 
High Performance SSRS
High Performance SSRSHigh Performance SSRS
High Performance SSRS
 
OSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles JudithOSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles Judith
 
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo
 
Tungsten Use Case: Modernizing Medicine, a SaaS solution running on Amazon AWS
Tungsten Use Case: Modernizing Medicine, a SaaS solution running on Amazon AWSTungsten Use Case: Modernizing Medicine, a SaaS solution running on Amazon AWS
Tungsten Use Case: Modernizing Medicine, a SaaS solution running on Amazon AWS
 
Azure SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Database
 
Achieving Gold Medal Performance From SQL Server
Achieving Gold Medal Performance From SQL ServerAchieving Gold Medal Performance From SQL Server
Achieving Gold Medal Performance From SQL Server
 
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACIDACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
 
Mmckeown hadr that_conf
Mmckeown hadr that_confMmckeown hadr that_conf
Mmckeown hadr that_conf
 
Intro to Azure SQL database
Intro to Azure SQL databaseIntro to Azure SQL database
Intro to Azure SQL database
 
Workshop - cqrs brief introduction
Workshop - cqrs brief introductionWorkshop - cqrs brief introduction
Workshop - cqrs brief introduction
 
Azure + DataStax Enterprise (DSE) Powers Office365 Per User Store
Azure + DataStax Enterprise (DSE) Powers Office365 Per User StoreAzure + DataStax Enterprise (DSE) Powers Office365 Per User Store
Azure + DataStax Enterprise (DSE) Powers Office365 Per User Store
 
Building Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricBuilding Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL Fabric
 
Sql azure cluster dashboard public.ppt
Sql azure cluster dashboard public.pptSql azure cluster dashboard public.ppt
Sql azure cluster dashboard public.ppt
 
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
 
Introduction to SQL Server Internals: How to Think Like the Engine
Introduction to SQL Server Internals: How to Think Like the EngineIntroduction to SQL Server Internals: How to Think Like the Engine
Introduction to SQL Server Internals: How to Think Like the Engine
 
How to think like the engine
How to think like the engineHow to think like the engine
How to think like the engine
 
MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015
MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015
MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015
 
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginnersKoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
 

More from Guido Schmutz

30 Minutes to the Analytics Platform with Infrastructure as Code
30 Minutes to the Analytics Platform with Infrastructure as Code30 Minutes to the Analytics Platform with Infrastructure as Code
30 Minutes to the Analytics Platform with Infrastructure as CodeGuido Schmutz
 
Event Broker (Kafka) in a Modern Data Architecture
Event Broker (Kafka) in a Modern Data ArchitectureEvent Broker (Kafka) in a Modern Data Architecture
Event Broker (Kafka) in a Modern Data ArchitectureGuido Schmutz
 
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsBig Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsGuido Schmutz
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!Guido Schmutz
 
Kafka as your Data Lake - is it Feasible?
Kafka as your Data Lake - is it Feasible?Kafka as your Data Lake - is it Feasible?
Kafka as your Data Lake - is it Feasible?Guido Schmutz
 
Event Hub (i.e. Kafka) in Modern Data Architecture
Event Hub (i.e. Kafka) in Modern Data ArchitectureEvent Hub (i.e. Kafka) in Modern Data Architecture
Event Hub (i.e. Kafka) in Modern Data ArchitectureGuido Schmutz
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaGuido Schmutz
 
Event Hub (i.e. Kafka) in Modern Data (Analytics) Architecture
Event Hub (i.e. Kafka) in Modern Data (Analytics) ArchitectureEvent Hub (i.e. Kafka) in Modern Data (Analytics) Architecture
Event Hub (i.e. Kafka) in Modern Data (Analytics) ArchitectureGuido Schmutz
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaGuido Schmutz
 
Location Analytics - Real-Time Geofencing using Apache Kafka
Location Analytics - Real-Time Geofencing using Apache KafkaLocation Analytics - Real-Time Geofencing using Apache Kafka
Location Analytics - Real-Time Geofencing using Apache KafkaGuido Schmutz
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS and Apache KafkaSolutions for bi-directional integration between Oracle RDBMS and Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS and Apache KafkaGuido Schmutz
 
What is Apache Kafka? Why is it so popular? Should I use it?
What is Apache Kafka? Why is it so popular? Should I use it?What is Apache Kafka? Why is it so popular? Should I use it?
What is Apache Kafka? Why is it so popular? Should I use it?Guido Schmutz
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaGuido Schmutz
 
Location Analytics Real-Time Geofencing using Kafka
Location Analytics Real-Time Geofencing using KafkaLocation Analytics Real-Time Geofencing using Kafka
Location Analytics Real-Time Geofencing using KafkaGuido Schmutz
 
Streaming Visualisation
Streaming VisualisationStreaming Visualisation
Streaming VisualisationGuido Schmutz
 
Kafka as an event store - is it good enough?
Kafka as an event store - is it good enough?Kafka as an event store - is it good enough?
Kafka as an event store - is it good enough?Guido Schmutz
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaGuido Schmutz
 
Fundamentals Big Data and AI Architecture
Fundamentals Big Data and AI ArchitectureFundamentals Big Data and AI Architecture
Fundamentals Big Data and AI ArchitectureGuido Schmutz
 
Location Analytics - Real-Time Geofencing using Kafka
Location Analytics - Real-Time Geofencing using Kafka Location Analytics - Real-Time Geofencing using Kafka
Location Analytics - Real-Time Geofencing using Kafka Guido Schmutz
 
Streaming Visualization
Streaming VisualizationStreaming Visualization
Streaming VisualizationGuido Schmutz
 

More from Guido Schmutz (20)

30 Minutes to the Analytics Platform with Infrastructure as Code
30 Minutes to the Analytics Platform with Infrastructure as Code30 Minutes to the Analytics Platform with Infrastructure as Code
30 Minutes to the Analytics Platform with Infrastructure as Code
 
Event Broker (Kafka) in a Modern Data Architecture
Event Broker (Kafka) in a Modern Data ArchitectureEvent Broker (Kafka) in a Modern Data Architecture
Event Broker (Kafka) in a Modern Data Architecture
 
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsBig Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!
 
Kafka as your Data Lake - is it Feasible?
Kafka as your Data Lake - is it Feasible?Kafka as your Data Lake - is it Feasible?
Kafka as your Data Lake - is it Feasible?
 
Event Hub (i.e. Kafka) in Modern Data Architecture
Event Hub (i.e. Kafka) in Modern Data ArchitectureEvent Hub (i.e. Kafka) in Modern Data Architecture
Event Hub (i.e. Kafka) in Modern Data Architecture
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
 
Event Hub (i.e. Kafka) in Modern Data (Analytics) Architecture
Event Hub (i.e. Kafka) in Modern Data (Analytics) ArchitectureEvent Hub (i.e. Kafka) in Modern Data (Analytics) Architecture
Event Hub (i.e. Kafka) in Modern Data (Analytics) Architecture
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka
 
Location Analytics - Real-Time Geofencing using Apache Kafka
Location Analytics - Real-Time Geofencing using Apache KafkaLocation Analytics - Real-Time Geofencing using Apache Kafka
Location Analytics - Real-Time Geofencing using Apache Kafka
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS and Apache KafkaSolutions for bi-directional integration between Oracle RDBMS and Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafka
 
What is Apache Kafka? Why is it so popular? Should I use it?
What is Apache Kafka? Why is it so popular? Should I use it?What is Apache Kafka? Why is it so popular? Should I use it?
What is Apache Kafka? Why is it so popular? Should I use it?
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
 
Location Analytics Real-Time Geofencing using Kafka
Location Analytics Real-Time Geofencing using KafkaLocation Analytics Real-Time Geofencing using Kafka
Location Analytics Real-Time Geofencing using Kafka
 
Streaming Visualisation
Streaming VisualisationStreaming Visualisation
Streaming Visualisation
 
Kafka as an event store - is it good enough?
Kafka as an event store - is it good enough?Kafka as an event store - is it good enough?
Kafka as an event store - is it good enough?
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
 
Fundamentals Big Data and AI Architecture
Fundamentals Big Data and AI ArchitectureFundamentals Big Data and AI Architecture
Fundamentals Big Data and AI Architecture
 
Location Analytics - Real-Time Geofencing using Kafka
Location Analytics - Real-Time Geofencing using Kafka Location Analytics - Real-Time Geofencing using Kafka
Location Analytics - Real-Time Geofencing using Kafka
 
Streaming Visualization
Streaming VisualizationStreaming Visualization
Streaming Visualization
 

Recently uploaded

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

SQL vs. NoSQL

  • 1. 2014 © Trivadis BASEL BERN BRUGG LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA
 2014 © Trivadis SQL versus NoSQL Guido Schmutz Philipp Salvisberg 3rd July 2014 SQL versus NoSQL 1
  • 2. 2014 © Trivadis Guido Schmutz §  Working for Trivadis for more than 17 years §  Oracle ACE Director for Fusion Middleware and SOA §  Co-Author of different books §  Consultant, Trainer Software Architect for Java, Oracle, SOA and Big Data / Fast Data §  Member of Trivadis Architecture Board §  Technology Manager @ Trivadis §  More than 25 years of software development experience §  Contact: guido.schmutz@trivadis.com §  Blog: http://guidoschmutz.wordpress.com §  Twitter: gschmutz 3rd July 2014 SQL versus NoSQL 2
  • 3. 2014 © Trivadis Philipp Salvisberg §  With Trivadis since April 2000 §  Senior Principal Consultant, Partner §  Member of the Board of Directors §  philipp.salvisberg@trivadis.com §  www.salvis.com/blog §  @phsalvisberg §  Member of the §  Main focus on database centric development with Oracle DB §  Application Development §  Business Intelligence §  Application Performance Management §  Over 20 years experience in using Oracle products 3rd July 2014 SQL versus NoSQL 3
  • 4. 2014 © Trivadis Agenda 1.  Motivation 2.  Overview of SQL and NoSQL Data Stores 3.  Use Cases – Let's Get Ready to Rumble 4.  Recommended Reads 5.  Core Messages 3rd July 2014 SQL versus NoSQL 4 #Schwabengipfel14 #SQL #Schwabengipfel14 #NoSQL #Schwabengipfel14 #SQL #NoSQL
  • 5. 2014 © Trivadis Understanding the Merits 3rd July 2014 SQL versus NoSQL 5 Why NoSQL? Can do everything with RDBMSs! Having performance, scalability, transactions and SQL. A key-value store is adequate for key lookups and easier to understand than a RDBMS. RDBMSs do not scale as good as NoSQL systems like Google’s BigTable. RDBMSs provide a common interface with SQL, transactions, and relational schema. Some applications require a flexible schema. Adding new attributes at runtime in RDBMSs is typically not possible.… … Source: Scalable SQL and NoSQL Data Stores, Rick Catell, 2010
  • 6. 2014 © Trivadis Agenda 1.  Motivation 2.  Overview of SQL and NoSQL Data Stores 3.  Use Cases – Let's Get Ready to Rumble 4.  Recommended Reads 5.  Conclusion 3rd July 2014 SQL versus NoSQL 6
  • 7. 2014 © Trivadis SQL Data Stores §  Relational Model §  Standardized, SQL:2011 is the 7th major revision since SQL-86 §  9 parts, more than 4000 pages §  But no single database implements all standards/features §  Rich set of features §  Incl. SQL/PSM, SQL/MED, SQL/XML, SQL/RPR, Temporal Features §  Incl. User-defined Types and Collection Types (since SQL:1999) §  ACID Transactions §  Atomicity: all or nothing §  Consistency: from valid state to valid state considering constraints, triggers, … §  Isolation: result is not affected through concurrent execution §  Durability: committed data stays available after crash, power loss or errors §  Good support by different languages, frameworks and tools §  Good understanding of basic concepts by IT professionals 3rd July 2014 SQL versus NoSQL 7
  • 8. 2014 © Trivadis NoSQL Definition §  Next Generation Databases mostly addressing some of the points: §  being non-relational, §  distributed, §  open-source and §  horizontally scalable. §  Often more characteristics apply such as: §  schema-free, §  easy replication support, §  simple API, §  eventually consistent / BASE (not ACID), §  a huge amount of data §  and more. §  The misleading term "nosql" (the community now translates it mostly with "not only sql") should be seen as an alias to something like the definition above 3rd July 2014 SQL versus NoSQL 8 Source: http://nosql-database.org BASE §  Basically Available: Availability is more important than consistency §  Soft State: Higher availability results in an eventual consistent state §  Eventually Consistent: If no new updates are made to a given data item, eventually all accesses to that item will return the last updated value
  • 9. 2014 © Trivadis Brewer's CAP Theorem Any networked shared-data system can have at most two of the three desirable properties: §  Consistency All of the nodes see the same data at the same time, regardless of where the data is stored §  Availability Node failures do not prevent survivors from continuing to operate §  Network Partition tolerance The system continues to operate despite arbitrary message loss 3rd July 2014 SQL versus NoSQL 9 Availability Consistency Network Partition Tolerance n/a CA CP AP
  • 10. 2014 © Trivadis Data Store Positioning 3rd July 2014 SQL versus NoSQL 10 Scalability Standardized Model, Tooling, Complexity Key-value Wide Column (Column Families / Extensible Records) Document Graph Relational SQL Comfort Zone Multi Dimensional
  • 11. 2014 © Trivadis Agenda 1.  Motivation 2.  Overview of SQL and NoSQL Data Stores 3.  Use Cases – Let's Get Ready to Rumble 4.  Recommended Reads 5.  Core Messages 3rd July 2014 SQL versus NoSQL 11
  • 12. 2014 © Trivadis 3rd July 2014 SQL versus NoSQL 12 Round 1 Smart Meter
  • 13. 2014 © Trivadis Smart Meter – Introduction §  Data is captured from 2 million smart meters (1 main sensor, 10 optional sub-sensors, e.g. fridge, stove, dish-washer, wash-machine, TV, computer, …) §  One smart meter per household §  Measures the energy consumption §  Delivery interval between 1 second and 5 minutes §  Every sensor measures and delivers the energy consumption per second (kWh) §  AP Characteristics (Consistency is not so important) 3rd July 2014 SQL versus NoSQL 13
  • 14. 2014 © Trivadis Smart Meter – Customer Dashboard 3rd July 2014 SQL versus NoSQL 14
  • 15. 2014 © Trivadis Smart Meter – Use Cases §  Store sensor and its sub-sensor values §  2 Mio sensors, up to 10 sub-sensors §  Energy consumption per second per sensor (kWh) §  Delivery interval between 1 second and 5 minutes §  Query usage per sensor and its sub-sensors to visualize a time series on a customer dashboard §  Available in different granularities, values are aggregated in -  Minute -  Quarter of hour (15-minutes) -  Hour -  Day §  Responsive UI 3rd July 2014 SQL versus NoSQL 15 Smart Meter Store data of millions of sensors Household Dashboard
  • 16. 2014 © Trivadis Cassandra NoSQL Datastore •  Wide-Column Store •  Developed at Facebook •  Professional grade support from DataStax •  Main Features §  Real-Time §  Highly Distributed §  Support for Multiple Data Center §  Highly Scalable §  No Single Point of Failure §  Fault Tolerant §  Tunable Consistency §  CQL – Cassandra Query Language 3rd July 2014 SQL versus NoSQL 16
  • 17. 2014 © Trivadis The Cassandra Way 3rd July 2014 SQL versus NoSQL 17 Household Bucket AFG10 MINUTE-2014/03/5 sensor 1 1 1 … 2 2 … at 11:59 11:58 11:57 … 11:59 11:58 … kwh 7.05 7.10 8.11 … 6.95 7.04 … AFG10 QHOUR-2014/03 sensor 1 1 1 … 2 2 … at 5T11:45 5T11:30 5T11:15 … 5T11:45 5T11:30 … kwh 105.78 104.73  102.29 … 102.78 101.61 … AFG10 HOUR-2014/03 sensor 1 1 1 … 2 2 … at 5T11 5T10 5T09 … 5T11 5T10 … kwh 423.00 410.33 395.99 … 598.32 522.12 … AFG10 DAY-2014 sensor 1 1 1 … 2 2 … at 5T 3T 2T … 5T 4T … kwh 10100.2 9892.2 8987.4 … 879.8 912,3 … GXK11 MINUTE-2014/03/5 sensor 1 1 1 … 2 2 … at 11:59 11:03 11:04 … 11:01 11:02 … kwh 100.10 90.88 95.00 … 92.50 88.50 … Growth 24h * 60m * 11 sensor = 15’840 cols 30d * 24h * 4q * 11 sensor = 31’680 cols 30d * 24h * 11 sensor = 7’920 cols 365d * 11 sensor = 4’011 cols
  • 18. 2014 © Trivadis The Cassandra Way 3rd July 2014 SQL versus NoSQL 18
  • 19. 2014 © Trivadis The Cassandra Way §  288 nodes on EC2 §  Over 1 Mio writes/sec => 60 Mio writes/min §  Rolling counters, always up to date 3rd July 2014 SQL versus NoSQL 19
  • 20. 2014 © Trivadis Relational Architecture §  Active Data Guard Configuration §  Global Data Services redirects requests based on §  Server loads §  Request type (read/write) §  Reader farm is geographically spread §  Failover/switchover to any node in the reader farm is possible §  Read services are not affected §  Write services are unavailable for a short period of time §  Scalability of the write services is the bottleneck of the system 3rd July 2014 SQL versus NoSQL 20 Global Data Services Client Read/Write Read-only Read-only Read-only Sensor Sensor
  • 21. 2014 © Trivadis Relational Data Model §  SENSOR_READINGS_... §  Index-organized tables §  Daily partitions §  JDBC Batch Merges §  A transaction per sensor delivery §  A single network roundtrip to merge 55 readings of a sensor delivery §  Average between -  0.4 Mio tpm (delivery per 5 minutes) -  120 Mio tpm (delivery per second) §  Top TPC-C Benchmark: 8.5 Mio tpm §  Batch job to aggregate readings every 15 minutes, avoiding intermediate results (updates) §  Quarter of hour (5760 times a day) §  Hour (24 times a day) §  Day (once a day) 3rd July 2014 SQL versus NoSQL 21
  • 22. 2014 © Trivadis Query Sensor Data – The SQL Way Use aggregate tables to change granularity (quarter of hours, hours, days) SELECT sensor_id, start_time, usage_kwh FROM sensor_readings_minute WHERE sensor_id IN (SELECT sensor_id FROM sensors WHERE sensor_id = :p_parent_sensor OR parent_sensor_id = :p_parent_sensor) AND start_time BETWEEN :p_from AND :p_to ORDER BY sensor_id, start_time; 3rd July 2014 SQL versus NoSQL 22
  • 23. 2014 © Trivadis 3rd July 2014 SQL versus NoSQL 23 Smart Meter 0 – 1
  • 24. 2014 © Trivadis 3rd July 2014 SQL versus NoSQL 24 Round 2 Order Entry
  • 25. 2014 © Trivadis Order Entry – Introduction §  Orders are entered via GUI §  Orders may be modified as long as the order status is "incomplete" §  Order status is set to "complete" after a final approval §  A lot of data is available in the system §  Some sales volume analysis are wanted §  CA Characteristics (network partition tolerance is not so important) 3rd July 2014 SQL versus NoSQL 25
  • 26. 2014 © Trivadis Order Entry – Example 3rd July 2014 SQL versus NoSQL 26
  • 27. 2014 © Trivadis Order Entry – Use Cases §  Update the quantity in stock of all ordered products §  When order status changes from "incomplete" to "complete" §  When order status changes from "complete" to "cancelled" §  Ensure that the quantity in stock is always correct (no lost updates or similar) §  Create a report to show all sales for a year per country §  Create a report for the 5 top-selling products for a year 3rd July 2014 SQL versus NoSQL 27 Order Entry Update quantity in Stock Sales per country Top 5 selling products
  • 28. 2014 © Trivadis Relational Model 3rd July 2014 SQL versus NoSQL 28
  • 29. 2014 © Trivadis Change Quantity in Stock – The SQL Way Single Transaction UPDATE ORDERS SET order_status = :p_value_for_complete WHERE order_id = :p_order_id; MERGE INTO PRODUCTS t USING (SELECT product_id, SUM(quantity) AS quantity FROM order_items WHERE order_id = :p_order_id GROUP BY product_id) s ON (t.product_id = s.product_id) WHEN MATCHED THEN UPDATE SET t.quantity_on_stock = t.quantity_on_stock - s.quantity; COMMIT; 3rd July 2014 SQL versus NoSQL 29
  • 30. 2014 © Trivadis Sales Volume per Country – The SQL Way SELECT c.name as country_name, SUM(i.quantity * i.unit_price) AS sales_volume FROM order_items i INNER JOIN orders o ON o.order_id = i.order_id INNER JOIN addresses a ON a.address_id = o.shipping_address_id INNER JOIN countries c ON c.country_id = a.country_id WHERE o.order_date >= DATE '2013-01-01' AND o.order_date < DATE '2014-01-01' GROUP BY c.name ORDER BY 2 DESC; 3rd July 2014 SQL versus NoSQL 30
  • 31. 2014 © Trivadis 5 Top-Selling Products – The SQL Way SELECT p.name AS product_name, SUM(i.quantity * i.unit_price) AS sales_volume FROM order_items i INNER JOIN orders o ON o.order_id = i.order_id INNER JOIN products p ON p.product_id = i.product_id WHERE o.order_date > DATE '2013-01-01' AND o.order_date <= DATE '2014-01-01' AND o.order_status = :p_value_for_complete GROUP BY p. name ORDER BY 2 DESC FETCH FIRST 5 ROWS WITH TIES; 3rd July 2014 SQL versus NoSQL 31
  • 32. 2014 © Trivadis MongoDB NoSQL Store •  Document Store •  Developed by 10gen, now MongoDB Inc. •  Professional grade support by MongoDB Inc. •  Main Features •  JSON Data Model with Dynamic Schemas •  Auto-Sharding for Horizontal Scalability •  Built-In Replication for High Availability •  Rich Secondary Indexes, including geospatial and TTL indexes •  Text Search •  Aggregation Framework & Native MapReduce 3rd July 2014 SQL versus NoSQL 32
  • 33. 2014 © Trivadis Customer MongoDB Document Data Model (Aggregate Pattern) 3rd July 2014 SQL versus NoSQL 33 Order Order Items Order Item 1 Order Item 2 Order Item n Shipping Address Billing Address Product Category Suppliers Supplier 1 Address Supplier n Address Supplier 1 Address Address
  • 34. 2014 © Trivadis Update Quantity in Stock – The MongoDB Way ForEach orderItems.item { db.products.update( { productId : 101 }, { $inc : { quantity: -10 } }, { multi: false } ); } 3rd July 2014 SQL versus NoSQL 34 db.orders.find ( { orderId: 1} ); db.orders.update( { orderId: 1}, { $set : { orderStatus: "COMPLETE" } }, { multi: false } ); Transaction 1 Read Operation Transaction 2 .. n
  • 35. 2014 © Trivadis Sales Volume per Country – The MongoDB Way var mapFunction = function() { for (var idx = 0; idx < this.orderItems.length; idx++) { var value = this.orderItems[idx].unitPrice * this.orderItems[idx].quantity; emit(this.shippingAddress.country, value); } }; var reduceFunction = function(name, valuesPrices) { return Array.sum(valuesPrices); }; db.orders.mapReduce(mapFunction, reduceFunction, { out : {inline:1}, query: { orderStatus: "COMPLETE", orderDate: { $gt: ISODate("2014-01-01"), $lt: ISODate("2014-04-01") } } }); 3rd July 2014 SQL versus NoSQL 35
  • 36. 2014 © Trivadis 5 Top-Selling Products – The MongoDB Way db.orders.aggregate([ { $match : { orderStatus: "COMPLETE", orderDate: { $gt: ISODate("2014-01-01"), $lt: ISODate("2014-04-01") } } }, { $unwind : "$orderItems" }, { $project : { _id: 0, productId: "$orderItems.productId", total : { $multiply : ["$orderItems.quantity", "$orderItems.unitPrice”] } } }, { $group : { _id: "$productId", total : { $sum : "$total"} } }, { $sort : { total: -1 }}, { $limit : 5 } ]) 3rd July 2014 SQL versus NoSQL 36
  • 37. 2014 © Trivadis 3rd July 2014 SQL versus NoSQL 37 Order Entry 1 – 1
  • 38. 2014 © Trivadis 3rd July 2014 SQL versus NoSQL 38 Round 3 Spotify
  • 39. 2014 © Trivadis Spotify – Introduction §  Music service which is available worldwide §  Over 20’000’000 music tracks available §  Millions of users §  Each user has dozens of playlists §  Many AP but also some CA use cases 3rd July 2014 SQL versus NoSQL 39
  • 40. 2014 © Trivadis Spotify – Example 3rd July 2014 SQL versus NoSQL 40
  • 41. 2014 © Trivadis Spotify – Use Cases §  Playlist, Showing Ads, Following Artists … are all uses cases which have to be highly available, and accessible worldwide §  Needs to be distributed to be fast §  Service should be available even if a partition happen (due to network failure/ machine failure) §  First time subscription and subscription renewal must be absolutely consistent §  Customer should only pay once! 3rd July 2014 SQL versus NoSQL 41 Spotify Renewals (payments) Globally available playlists
  • 42. 2014 © Trivadis Polyglot Persistence – SQL And NoSQL 3rd July 2014 SQL versus NoSQL 42 Spotify Platform Playlists, Ads, Followings Subscriptions and Payments Wide-column store RDBMS
  • 43. 2014 © Trivadis 3rd July 2014 SQL versus NoSQL 43 Spotify 2 – 2 Draw!
  • 44. 2014 © Trivadis Agenda 1.  Motivation 2.  Overview of SQL and NoSQL Data Stores 3.  Use Cases – Let's Get Ready to Rumble 4.  Recommended Reads 5.  Core Messages 3rd July 2014 SQL versus NoSQL 44
  • 45. 2014 © Trivadis Further information ... 3rd July 2014 SQL versus NoSQL 45 §  http://martinfowler.com/books/nosql.html §  http://www.manning.com/mccreary/ §  http://highlyscalable.wordpress.com §  http://nosql-database.org §  http://db-engines.com/
  • 46. 2014 © Trivadis Agenda 1.  Motivation 2.  Overview of SQL and NoSQL Data Stores 3.  Use Cases – Let's Get Ready to Rumble 4.  Recommended Reads 5.  Core Messages 3rd July 2014 SQL versus NoSQL 46
  • 47. 2014 © Trivadis Core Messages §  We will see a major consolation in the NoSQL area §  SQL is and stays important §  Polyglot persistence will be part of every solution design in the near future §  Enterprise capabilities are required §  Tooling (monitoring, backup & recovery, data security, …) §  Organization, skills §  Opportunity for cloud based solutions 3rd July 2014 SQL versus NoSQL 47
  • 48. 2014 © Trivadis Questions and answers ... 2014 © Trivadis BASEL BERN BRUGES LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA
 Guido Schmutz Technology Manager Philipp Salvisberg Senior Principal Consultant 3rd July 2014 SQL versus NoSQL 48