SQL-based databases have been around for decades and they power a wide range of applications. So what exactly do NoSQL databases bring to the table? In this webcast, you'll find out how NoSQL can liberate your development cycle, allow your application to scale and improve your system's uptime.
5. RDBMs
Relational Database Management Systems
SQL language developed by IBM in the 1970s
RDBMs power lots of IT systems
Oracle, IBM DB2, MySQL, PostgreSQL etc
5
10. SQL vs NoSQL - Development Cycle
Build
Migrate staging database
Test
Migrate production
Deploy
10
Build
Test
Deploy
11. Database migrations are costly
Adding/updating/deleting columns
May cause interruption to service
Often performed "out of hours"
Have to be carefully planned in multi-server deployments
11
15. Scaling a Cloudant database
15
• Database-as-a-Service
• Free/PAYG/Dedicated/Local
• Sign up and start using
• Scale by adding nodes
• More data
• More concurrency
19. SQL
19
SELECT * from users
LEFT JOIN socialmediaprofiles
ON users.userid =
socialmediaprofiles.userid
WHERE registration_date > "2015-01-01"
AND verified = true
AND socialmedia = true
ORDER BY registration_date
24. 24
CRUD – Document Primary
Index
Secondary Index
(view)
Search
Index
GeoSpatial Index Cloudant
Query
• Direct document
look up by _id
• Exists “OOTB”
• stored in a b-tree
• Primary key
doc._id
• Built using
MapReduce
• stored in a b-tree
• Key user-
defined field(s)
• Built using Lucene
• FTI: Any or all
fields can be
indexed
• stored in R*, TPR,
KD tree
• Lat/Long
coorindates in
GeoJSON
• “Mongo-style”
querying
• Built natively in
erlang
• Use when you
want a single
document and
can find by its _id
• Use when you can
find documents
based on their _id
• Pull back a range
of keys
• Use when you
need to analyze
data or get a
range of keys
• Ex: count data
fields,
sum/average
numeric results,
advanced stats,
group by date,
etc.
• Ad-hoc queries
• Find documents
based on their
contents
• Can do groups,
facets, and basic
geo queries (bbox
& sort by
distance)
• Complex
geometries
(polygon,
circularstring, etc.)
• Advanced
relations
(intersect,
overlaps, etc.)
• Ad-hoc queries
• Lots of operators
(>, <, IN, OR,
AND, etc.)
• Intuitive for people
coming from
Mongo or SQL
backgrounds
26. Cloudant Replication
26
• Replicate data from one cluster to another
• Replicate data to browser/mobile and back
• No data loss
• Offline-first apps/websites
• http://www.glynnbird.com/
28. Simple Search Service
Free, open-source Bluemix App – install
with one click
Upload your .csv or .tsv
– Imports data into Cloudant
– Indexes everything for search
– Presents HTTP Search API
Demo!
28
https://developer.ibm.com/clouddataservices/simple-search-service/
31. Cloudant use-cases
Big Data – Large data sets
Scalable operational data store
Search – faceted, full-text search
Geo-spatial – geographic, GIS systems, GeoJSON
Offline-first – replicating data to mobile devices
31