SlideShare a Scribd company logo
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved.
NOSQL OPTION FOR
DATA STORAGE IN
YOUR IOS APPS
Twitter : @rajagp
Priya Rajagopal | Developer Advocate
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 2
Who am I
• Priya Rajagopal
• Mobile Developer Advocate, Couchbase
• Long time iOS Developer
• Over a decade in R&D
• Co-inventor on 22 technology related patents
• Twitter : @ rajagp
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved.
WHY MOBILE
STORAGE1
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 4
Mobile Data Storage : Why?
• Creating “offline first” apps
• Airplane mode
• Regions of poor or no network connectivity
• Improve Perceived User Experience / Start up Time
• Prebuilt bundled database
• Caching of semi-static /static dsata
• “Offline-only” Store
• No backend to host data / Local only store
• Privacy
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 5
Mobile Data Storage Platform: Use Cases
• Plethora of Device Types
• Cloud Sync
• Offline Only
Or
• Conflict Resolution
• Peer to Peer Sync
• Scalability
• Security
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved.
NOSQL
2
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 7
NoSQL
• Non Relational
• Unstructured/ Semi-structured
• Scalable
• Many flavors
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 8
Four popular NoSQL data models
Key-value
Email advocates@couchbase.com
Key Value
Profile {
"name": "A Person",
"location": "Someplace"
}
Logo
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 9
Four popular NoSQL data models
Author Column 1Row
Columnar
JK Rowling
Column 2
Harry Potter and the
Philosopher's Stone 1997
Title
Year of
release
Harry Potter and the
Chamber of Secrets 1998
Harry Potter and the
NoSQL database 2017
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 10
Four popular NoSQL data models
Graph
Priya Shirly
Ann
Jackson
MITMassachusetts
RPI
Went to President
of
Went to
Is in
Lived in
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 11
Four popular NoSQL data models
Document
{
"name": "A Person",
"location": "Place",
"team": "Team A",
"interests": "music"
}
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved.
JSON DOCUMENT
STORE3
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 13
Case 1: “JSON In. JSON Out”
• Popular data exchange format with web services
• JSON (De)Serializer Support in platforms
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 14
Case 2: Impedence Mismatch with Relational Tables
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 15
Impedence Mismatch with Core Data Model
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 16
JSON -> Native Object Mapping
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 17
Case 3: Going Schema-less
• Semi-Structured or Unstructured data
• Schema Evolution : “Agile” Development
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 18
Option 1 : Delete the app and reinstall
18
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 19
Option 2: Core Data Migrations
19
Managed Data
Model
(Source)
Managed Data
Model
(Target)
Source Data
Store
Mapping Model
Target Data
Store
Migration Policy
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 20
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved.
COUCHBASE MOBILE
4
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 22
Couchbase Mobile Platform
Couchbase
Lite
Embedded
NoSQL
JSON
Document
Store
Sync Gateway
Data Routing
Authorization
Replication
Websockets
Couchbase Server
Scalable
Distributed
Persistent
NoSQL
JSON
SECURITY
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 23
Couchbase Lite : Embedded DB that runs on your device
Mobile App
Couchbase Lite
Native API
Native Platform
Bindings
JSON
Lite Core Engine
Fleece
Storage Engine
This is what
Developers
care about
WS Replication Protocol w/ Sync Gateway
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved.
COUCHBASE LITE
API (2.0 BETA)4
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 25
Getting Started
• Open Source
• https://github.com/couchbase
• Free Community Edition
• Couchbase Lite 2.0 – Framework
• cocoapods, carthage, manual …
• Sync Gateway - Binary for various platforms, Containers, self-hosted (public / private clouds)
• Couchbase Server - Installer for various platforms, Containers, self-hosted (public / private
clouds)
• https://couchbase.com/downloads
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 26
Creating / Opening a Database (iOS Example)
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
let options = DatabaseConfiguration()
options.directory = appSupportFolderPath
// Open or create database
_db = try Database(name: kDBName, config: options)
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 27
CRUD
if let savedDoc = self.db.document(withID: doc.id) ?.toMutable(){
savedDoc.setString(“A100”, forKey: ”flight")
try db.saveDocument(savedDoc )
}
if let savedDoc = self.db.document(withID: doc.id) {
try self.db.deleteDocument(savedDoc)
}
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 28
Enabling Sync
let target = URLEndpoint(withURL: URL.init(string: "wss://localhost:4984"))
let config = ReplicatorConfiguration.init(database: db, target: target)
config.replicatorType = .pushAndPull
config.continuous = true
config.authenticator = BasicAuthenticator(username: user, password: password)
config.channels = [userChannel]
_pushPullRepl = Replicator(withConfig: config)
_pushPullReplListener = _pushPullRepl?.addChangeListener({ [weak self] (change) in
let s = change.status
…} )
_pushPullRepl?.start()
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 29
Automatic Conflict Resolution
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 30
Queries
• SQL Like semantics
• Full Text Search
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 31
Basic Query Example
let searchQuery = QueryBuilder
.select(SelectResult.all())
.from(DataSource.database(db))
.where(Expression.property("type")
.equalTo(Expression.string("hotel")))
.limit(Expression.int(limit))
SELECT * FROM db WHERE "type" = "hotel” LIMIT 10
Response:
[
{
"id": "k_10019",
"db_name": {
”type": ”hotel”,
”name": ”abc1"
}
},
{
"id": "k_11029",
"db_name": {
”type":”hotel”,
”name": ”abc2"
}
}
]
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 32
Live Query
liveQueryListener = query.addChangeListener({ [weak self](change) in
…
for (_, row) in (change.results?.enumerated()) {
// handle result - row.toDictionary()
}
});
query.removeChangeListener(withToken: liveQueryListener )
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 33
Query : Pattern Matching & Logical Expressions
let searchQuery = QueryBuilder
.select(SelectResult.expression(Meta.id),
SelectResult.expression(Expression.property("name")))
.from(DataSource.database(db))
.where(
Expression.property("type").equalTo(Expression.string("landmark")).and(
Expression.property("name").like(Expression.string(”%Engin__r%"))))
SELECT ID, name FROM db WHERE "type" = "hotel" AND "name"
LIKE “%Engin___%”
• Royal Engineer
Museum
• Titanic Engineers'
Memorial
Like Wildcard
Expression
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 34
Query : Check for Null or Missing Properties
let searchQuery = Query
.select(SelectResult.expression(Expression.meta().id),
SelectResult.expression(Expression.property("email")))
.from(DataSource.database(db))
.where(Expression.property("email").isNullOrMissing())
.limit(Expression.int(limit))
Null / Missing
Check Expression
SELECT ID, email FROM db WHERE email IS NULL LIMIT 10
• Nothing equivalent of “IsMissing”
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 35
Query : Manipulating Arrays
let searchQuery = Query
.select(SelectResult.expression(Meta.id),
SelectResult.expression(Expression.property(“public_likes [0]”)))
.from(DataSource.database(db))
.where(
ArrayFunction.contains(Expression.property("public_likes"), value:
Expression.string(”Anne may")))
• No Array Support in SQL
{
"id": "k_10019",
"name": "Awesome
Hotel",
"type": "hotel",
"public_likes":
[
"john
appleseed",
"jill doe",
"Anne may"
]
}
Array Function
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 36
Query : Parameterization
let lowerCount = Expression.parameter("lower")
let upperCount = Expression.parameter("upper")
let searchQuery = QueryBuilder
.select(SelectResult.expression(Meta.id))
.from(DataSource.database(db))
.where(Expression.property(”num_reviews"). between(lowerCount, and: upperCount))
let params = Parameters.init().setInt(10, forName: "lower").setInt(100, forName: "upper")
searchQuery.parameters = params
{
"id": "k_10019",
"name": "Awesome
Hotel",
"type": "hotel",
“num_reviews”:50
}
String stmt = "SELECT id FROM db WHERE num_reviews BETWEEN ? AND ?";
prepStmt = con.prepareStatement(stmt);
prepStmt.setInt(1, 10);
prepStmt.setInt(2, 100);
Parameterized
Query
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 37
JOIN
Inner JOIN
Cross JOIN
Left JOIN
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 38
JOIN
let employeeDS = DataSource.database(db).as("employeeDS")
let departmentDS = DataSource.database(db).as("departmentDS")
let employeeDeptExpr = Expression.property("department").from("employeeDS")
let departmentCodeExpr = Expression.property("code").from("departmentDS")
// Join where the "department" field of employee documents is equal to the department "code" of
// "department" documents
let joinExpr = employeeDeptExpr.equalTo(departmentCodeExpr)
// join expression
let join = Join.join(departmentDS).on(joinExpr)
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 39
JOIN
let searchQuery =
Query.select(SelectResult.expression(Expression.property("firstname").from("employeeDS")),
SelectResult.expression(Expression.property("lastname").from("employeeDS")),
SelectResult.expression(Expression.property("name").from("departmentDS")))
.from(employeeDS)
.join(join)
.where(Expression.property("type").from("employeeDS").equalTo(Expression.string("employee"))
.and(Expression.property("type").from("departmentDS").equalTo(Expression.string("department"))))
SELECT employeeDS.firstname, employeeDS.lastname, departmentDS.name FROM `travel-sample`
employeeDS INNER JOIN `travel-sample` departmentDS ON employeeDS.department =
departmentDS.code WHERE employeeDS.type = "employee" AND departmentDS.type = "department"
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 40
Full Text Search
// Create FTS Index on name and content properties
let ftsIndex = try Index.fullTextIndex(withItems:
FullTextIndexItem.property("content"),FullTextIndexItem.property("name"))
try db.createIndex(ftsIndex,withName: "ContentAndNameFTSIndex")
let ftsExpression = FullTextExpression.index("ContentAndNameFTSIndex")
let searchQuery = Query
.select(SelectResult.expression(Meta.id))
.from(DataSource.database(db))
.where( ftsExpression.match("Mechanical")))
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 41
Query Expression
• Metadata
• Pattern Matching
• Comparison
• Collection
• Function
• Parameter
• Quantified
• Bitwise Operator
• Property
• Aggregate
• String
• Collation
• Regex
• FTS
• Null Check Operator
• Arithmetic Expressions
“Expression for constructing a Query Statement”
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 42
Resources
• Couchbase Mobile 2.0 Beta Announcement : https://blog.couchbase.com/announcing-couchbase-mobile-2-0-beta/
• Blogs : blog.couchbase.com
• Query Playground: https://github.com/couchbaselabs/couchbase-lite-ios-api-playground
• Developer Portal : developer.couchbase.com
• Couchbase Source : https://github.com/couchbase
• Forums: forums.couchbase.com
• Twitter @rajagp, #couchbase
FEEDBACK: https://bit.ly/houstongroup
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved.
THANK YOU!

More Related Content

What's hot

Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j
 
MongoDB & Hadoop - Understanding Your Big Data
MongoDB & Hadoop - Understanding Your Big DataMongoDB & Hadoop - Understanding Your Big Data
MongoDB & Hadoop - Understanding Your Big Data
MongoDB
 
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search EngineChicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Lucidworks (Archived)
 
Using MongoDB + Hadoop Together
Using MongoDB + Hadoop TogetherUsing MongoDB + Hadoop Together
Using MongoDB + Hadoop Together
MongoDB
 
Intro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesIntro to Neo4j and Graph Databases
Intro to Neo4j and Graph Databases
Neo4j
 
Intro to Search
Intro to SearchIntro to Search
Intro to Search
Grant Ingersoll
 
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Open Analytics
 
Spectator to Participant. Contributing to Cassandra (Patrick McFadin, DataSta...
Spectator to Participant. Contributing to Cassandra (Patrick McFadin, DataSta...Spectator to Participant. Contributing to Cassandra (Patrick McFadin, DataSta...
Spectator to Participant. Contributing to Cassandra (Patrick McFadin, DataSta...
DataStax
 
GraphTour - Albelli: Running Neo4j on a large scale image platform
GraphTour - Albelli: Running Neo4j on a large scale image platformGraphTour - Albelli: Running Neo4j on a large scale image platform
GraphTour - Albelli: Running Neo4j on a large scale image platform
Neo4j
 
Big Data: Guidelines and Examples for the Enterprise Decision Maker
Big Data: Guidelines and Examples for the Enterprise Decision MakerBig Data: Guidelines and Examples for the Enterprise Decision Maker
Big Data: Guidelines and Examples for the Enterprise Decision Maker
MongoDB
 
Hands On: Introduction to the Hadoop Ecosystem
Hands On: Introduction to the Hadoop EcosystemHands On: Introduction to the Hadoop Ecosystem
Hands On: Introduction to the Hadoop Ecosystem
Adaryl "Bob" Wakefield, MBA
 
RDBMS to Graph Webinar
RDBMS to Graph WebinarRDBMS to Graph Webinar
RDBMS to Graph Webinar
Neo4j
 
Hermes: Free the Data! Distributed Computing with MongoDB
Hermes: Free the Data! Distributed Computing with MongoDBHermes: Free the Data! Distributed Computing with MongoDB
Hermes: Free the Data! Distributed Computing with MongoDB
MongoDB
 
GraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform OverviewGraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform Overview
Neo4j
 
Blazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & SparkBlazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & Spark
MongoDB
 
MongoDB et Hadoop
MongoDB et HadoopMongoDB et Hadoop
MongoDB et Hadoop
MongoDB
 
Practice of building apache sharding sphere iincubator community
Practice of building apache sharding sphere iincubator communityPractice of building apache sharding sphere iincubator community
Practice of building apache sharding sphere iincubator community
jixuan1989
 
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Lucidworks
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
Spark and MongoDB
Spark and MongoDBSpark and MongoDB
Spark and MongoDB
Norberto Leite
 

What's hot (20)

Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
 
MongoDB & Hadoop - Understanding Your Big Data
MongoDB & Hadoop - Understanding Your Big DataMongoDB & Hadoop - Understanding Your Big Data
MongoDB & Hadoop - Understanding Your Big Data
 
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search EngineChicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
 
Using MongoDB + Hadoop Together
Using MongoDB + Hadoop TogetherUsing MongoDB + Hadoop Together
Using MongoDB + Hadoop Together
 
Intro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesIntro to Neo4j and Graph Databases
Intro to Neo4j and Graph Databases
 
Intro to Search
Intro to SearchIntro to Search
Intro to Search
 
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
 
Spectator to Participant. Contributing to Cassandra (Patrick McFadin, DataSta...
Spectator to Participant. Contributing to Cassandra (Patrick McFadin, DataSta...Spectator to Participant. Contributing to Cassandra (Patrick McFadin, DataSta...
Spectator to Participant. Contributing to Cassandra (Patrick McFadin, DataSta...
 
GraphTour - Albelli: Running Neo4j on a large scale image platform
GraphTour - Albelli: Running Neo4j on a large scale image platformGraphTour - Albelli: Running Neo4j on a large scale image platform
GraphTour - Albelli: Running Neo4j on a large scale image platform
 
Big Data: Guidelines and Examples for the Enterprise Decision Maker
Big Data: Guidelines and Examples for the Enterprise Decision MakerBig Data: Guidelines and Examples for the Enterprise Decision Maker
Big Data: Guidelines and Examples for the Enterprise Decision Maker
 
Hands On: Introduction to the Hadoop Ecosystem
Hands On: Introduction to the Hadoop EcosystemHands On: Introduction to the Hadoop Ecosystem
Hands On: Introduction to the Hadoop Ecosystem
 
RDBMS to Graph Webinar
RDBMS to Graph WebinarRDBMS to Graph Webinar
RDBMS to Graph Webinar
 
Hermes: Free the Data! Distributed Computing with MongoDB
Hermes: Free the Data! Distributed Computing with MongoDBHermes: Free the Data! Distributed Computing with MongoDB
Hermes: Free the Data! Distributed Computing with MongoDB
 
GraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform OverviewGraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform Overview
 
Blazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & SparkBlazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & Spark
 
MongoDB et Hadoop
MongoDB et HadoopMongoDB et Hadoop
MongoDB et Hadoop
 
Practice of building apache sharding sphere iincubator community
Practice of building apache sharding sphere iincubator communityPractice of building apache sharding sphere iincubator community
Practice of building apache sharding sphere iincubator community
 
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
 
Spark and MongoDB
Spark and MongoDBSpark and MongoDB
Spark and MongoDB
 

Similar to No sql data-storage for-your-ios-apps-using-couchbase-mobile

Full-Stack Development with JavaScript and NoSQL
Full-Stack Development with JavaScript and NoSQLFull-Stack Development with JavaScript and NoSQL
Full-Stack Development with JavaScript and NoSQL
Aaron Benton
 
Why microservices architectures drive exceptional customer experiences
Why microservices architectures drive exceptional customer experiencesWhy microservices architectures drive exceptional customer experiences
Why microservices architectures drive exceptional customer experiences
Denis Wilson Souza Rosa
 
Big Data LDN 2018: BIG DATA TOO SLOW? SPRINKLE IN SOME NOSQL
Big Data LDN 2018: BIG DATA TOO SLOW? SPRINKLE IN SOME NOSQLBig Data LDN 2018: BIG DATA TOO SLOW? SPRINKLE IN SOME NOSQL
Big Data LDN 2018: BIG DATA TOO SLOW? SPRINKLE IN SOME NOSQL
Matt Stubbs
 
Select ML from Databases
Select ML from DatabasesSelect ML from Databases
Select ML from Databases
Nithish Raghunandanan
 
Select ML from Databases.pdf
Select ML from Databases.pdfSelect ML from Databases.pdf
Select ML from Databases.pdf
Nithish Raghunandanan
 
Couchbase Cloud No Equal (Rick Jacobs, Couchbase) Kafka Summit 2020
Couchbase Cloud No Equal (Rick Jacobs, Couchbase) Kafka Summit 2020Couchbase Cloud No Equal (Rick Jacobs, Couchbase) Kafka Summit 2020
Couchbase Cloud No Equal (Rick Jacobs, Couchbase) Kafka Summit 2020
HostedbyConfluent
 
Couchbase and Apache Kafka - Bridging the gap between RDBMS and NoSQL
Couchbase and Apache Kafka - Bridging the gap between RDBMS and NoSQLCouchbase and Apache Kafka - Bridging the gap between RDBMS and NoSQL
Couchbase and Apache Kafka - Bridging the gap between RDBMS and NoSQL
DATAVERSITY
 
20181019 code.talks graph_analytics_k_patenge
20181019 code.talks graph_analytics_k_patenge20181019 code.talks graph_analytics_k_patenge
20181019 code.talks graph_analytics_k_patenge
Karin Patenge
 
Slides: Moving from a Relational Model to NoSQL
Slides: Moving from a Relational Model to NoSQLSlides: Moving from a Relational Model to NoSQL
Slides: Moving from a Relational Model to NoSQL
DATAVERSITY
 
NoSQL Simplified: Schema vs. Schema-less
NoSQL Simplified: Schema vs. Schema-lessNoSQL Simplified: Schema vs. Schema-less
NoSQL Simplified: Schema vs. Schema-less
InfiniteGraph
 
Big Data Ecosystem- Impetus Technologies
Big Data Ecosystem-  Impetus TechnologiesBig Data Ecosystem-  Impetus Technologies
Big Data Ecosystem- Impetus Technologies
Impetus Technologies
 
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
Slides: NoSQL Data Modeling Using JSON Documents – A Practical ApproachSlides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
DATAVERSITY
 
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 updateDrupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Angela Byron
 
GPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge GraphGPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge Graph
Neo4j
 
2017 Hackathon Scality & 42 School
2017 Hackathon Scality & 42 School2017 Hackathon Scality & 42 School
2017 Hackathon Scality & 42 School
Scality
 
I Have a NoSQL toaster - DC - August 2017
I Have a NoSQL toaster - DC - August 2017I Have a NoSQL toaster - DC - August 2017
I Have a NoSQL toaster - DC - August 2017
Matthew Groves
 
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
confluent
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
Olivier DASINI
 
Building Enterprise-Ready Knowledge Graph Applications in the Cloud
Building Enterprise-Ready Knowledge Graph Applications in the CloudBuilding Enterprise-Ready Knowledge Graph Applications in the Cloud
Building Enterprise-Ready Knowledge Graph Applications in the Cloud
Peter Haase
 
Big Data and NoSQL for Database and BI Pros
Big Data and NoSQL for Database and BI ProsBig Data and NoSQL for Database and BI Pros
Big Data and NoSQL for Database and BI Pros
Andrew Brust
 

Similar to No sql data-storage for-your-ios-apps-using-couchbase-mobile (20)

Full-Stack Development with JavaScript and NoSQL
Full-Stack Development with JavaScript and NoSQLFull-Stack Development with JavaScript and NoSQL
Full-Stack Development with JavaScript and NoSQL
 
Why microservices architectures drive exceptional customer experiences
Why microservices architectures drive exceptional customer experiencesWhy microservices architectures drive exceptional customer experiences
Why microservices architectures drive exceptional customer experiences
 
Big Data LDN 2018: BIG DATA TOO SLOW? SPRINKLE IN SOME NOSQL
Big Data LDN 2018: BIG DATA TOO SLOW? SPRINKLE IN SOME NOSQLBig Data LDN 2018: BIG DATA TOO SLOW? SPRINKLE IN SOME NOSQL
Big Data LDN 2018: BIG DATA TOO SLOW? SPRINKLE IN SOME NOSQL
 
Select ML from Databases
Select ML from DatabasesSelect ML from Databases
Select ML from Databases
 
Select ML from Databases.pdf
Select ML from Databases.pdfSelect ML from Databases.pdf
Select ML from Databases.pdf
 
Couchbase Cloud No Equal (Rick Jacobs, Couchbase) Kafka Summit 2020
Couchbase Cloud No Equal (Rick Jacobs, Couchbase) Kafka Summit 2020Couchbase Cloud No Equal (Rick Jacobs, Couchbase) Kafka Summit 2020
Couchbase Cloud No Equal (Rick Jacobs, Couchbase) Kafka Summit 2020
 
Couchbase and Apache Kafka - Bridging the gap between RDBMS and NoSQL
Couchbase and Apache Kafka - Bridging the gap between RDBMS and NoSQLCouchbase and Apache Kafka - Bridging the gap between RDBMS and NoSQL
Couchbase and Apache Kafka - Bridging the gap between RDBMS and NoSQL
 
20181019 code.talks graph_analytics_k_patenge
20181019 code.talks graph_analytics_k_patenge20181019 code.talks graph_analytics_k_patenge
20181019 code.talks graph_analytics_k_patenge
 
Slides: Moving from a Relational Model to NoSQL
Slides: Moving from a Relational Model to NoSQLSlides: Moving from a Relational Model to NoSQL
Slides: Moving from a Relational Model to NoSQL
 
NoSQL Simplified: Schema vs. Schema-less
NoSQL Simplified: Schema vs. Schema-lessNoSQL Simplified: Schema vs. Schema-less
NoSQL Simplified: Schema vs. Schema-less
 
Big Data Ecosystem- Impetus Technologies
Big Data Ecosystem-  Impetus TechnologiesBig Data Ecosystem-  Impetus Technologies
Big Data Ecosystem- Impetus Technologies
 
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
Slides: NoSQL Data Modeling Using JSON Documents – A Practical ApproachSlides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
 
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 updateDrupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
 
GPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge GraphGPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge Graph
 
2017 Hackathon Scality & 42 School
2017 Hackathon Scality & 42 School2017 Hackathon Scality & 42 School
2017 Hackathon Scality & 42 School
 
I Have a NoSQL toaster - DC - August 2017
I Have a NoSQL toaster - DC - August 2017I Have a NoSQL toaster - DC - August 2017
I Have a NoSQL toaster - DC - August 2017
 
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
 
Building Enterprise-Ready Knowledge Graph Applications in the Cloud
Building Enterprise-Ready Knowledge Graph Applications in the CloudBuilding Enterprise-Ready Knowledge Graph Applications in the Cloud
Building Enterprise-Ready Knowledge Graph Applications in the Cloud
 
Big Data and NoSQL for Database and BI Pros
Big Data and NoSQL for Database and BI ProsBig Data and NoSQL for Database and BI Pros
Big Data and NoSQL for Database and BI Pros
 

Recently uploaded

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 

Recently uploaded (20)

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 

No sql data-storage for-your-ios-apps-using-couchbase-mobile

  • 1. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. NOSQL OPTION FOR DATA STORAGE IN YOUR IOS APPS Twitter : @rajagp Priya Rajagopal | Developer Advocate
  • 2. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 2 Who am I • Priya Rajagopal • Mobile Developer Advocate, Couchbase • Long time iOS Developer • Over a decade in R&D • Co-inventor on 22 technology related patents • Twitter : @ rajagp
  • 3. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. WHY MOBILE STORAGE1
  • 4. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 4 Mobile Data Storage : Why? • Creating “offline first” apps • Airplane mode • Regions of poor or no network connectivity • Improve Perceived User Experience / Start up Time • Prebuilt bundled database • Caching of semi-static /static dsata • “Offline-only” Store • No backend to host data / Local only store • Privacy
  • 5. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 5 Mobile Data Storage Platform: Use Cases • Plethora of Device Types • Cloud Sync • Offline Only Or • Conflict Resolution • Peer to Peer Sync • Scalability • Security
  • 6. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. NOSQL 2
  • 7. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 7 NoSQL • Non Relational • Unstructured/ Semi-structured • Scalable • Many flavors
  • 8. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 8 Four popular NoSQL data models Key-value Email advocates@couchbase.com Key Value Profile { "name": "A Person", "location": "Someplace" } Logo
  • 9. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 9 Four popular NoSQL data models Author Column 1Row Columnar JK Rowling Column 2 Harry Potter and the Philosopher's Stone 1997 Title Year of release Harry Potter and the Chamber of Secrets 1998 Harry Potter and the NoSQL database 2017
  • 10. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 10 Four popular NoSQL data models Graph Priya Shirly Ann Jackson MITMassachusetts RPI Went to President of Went to Is in Lived in
  • 11. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 11 Four popular NoSQL data models Document { "name": "A Person", "location": "Place", "team": "Team A", "interests": "music" }
  • 12. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. JSON DOCUMENT STORE3
  • 13. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 13 Case 1: “JSON In. JSON Out” • Popular data exchange format with web services • JSON (De)Serializer Support in platforms
  • 14. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 14 Case 2: Impedence Mismatch with Relational Tables
  • 15. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 15 Impedence Mismatch with Core Data Model
  • 16. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 16 JSON -> Native Object Mapping
  • 17. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 17 Case 3: Going Schema-less • Semi-Structured or Unstructured data • Schema Evolution : “Agile” Development
  • 18. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 18 Option 1 : Delete the app and reinstall 18
  • 19. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 19 Option 2: Core Data Migrations 19 Managed Data Model (Source) Managed Data Model (Target) Source Data Store Mapping Model Target Data Store Migration Policy
  • 20. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 20
  • 21. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. COUCHBASE MOBILE 4
  • 22. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 22 Couchbase Mobile Platform Couchbase Lite Embedded NoSQL JSON Document Store Sync Gateway Data Routing Authorization Replication Websockets Couchbase Server Scalable Distributed Persistent NoSQL JSON SECURITY
  • 23. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 23 Couchbase Lite : Embedded DB that runs on your device Mobile App Couchbase Lite Native API Native Platform Bindings JSON Lite Core Engine Fleece Storage Engine This is what Developers care about WS Replication Protocol w/ Sync Gateway
  • 24. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. COUCHBASE LITE API (2.0 BETA)4
  • 25. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 25 Getting Started • Open Source • https://github.com/couchbase • Free Community Edition • Couchbase Lite 2.0 – Framework • cocoapods, carthage, manual … • Sync Gateway - Binary for various platforms, Containers, self-hosted (public / private clouds) • Couchbase Server - Installer for various platforms, Containers, self-hosted (public / private clouds) • https://couchbase.com/downloads Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
  • 26. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 26 Creating / Opening a Database (iOS Example) Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. let options = DatabaseConfiguration() options.directory = appSupportFolderPath // Open or create database _db = try Database(name: kDBName, config: options)
  • 27. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 27 CRUD if let savedDoc = self.db.document(withID: doc.id) ?.toMutable(){ savedDoc.setString(“A100”, forKey: ”flight") try db.saveDocument(savedDoc ) } if let savedDoc = self.db.document(withID: doc.id) { try self.db.deleteDocument(savedDoc) }
  • 28. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 28 Enabling Sync let target = URLEndpoint(withURL: URL.init(string: "wss://localhost:4984")) let config = ReplicatorConfiguration.init(database: db, target: target) config.replicatorType = .pushAndPull config.continuous = true config.authenticator = BasicAuthenticator(username: user, password: password) config.channels = [userChannel] _pushPullRepl = Replicator(withConfig: config) _pushPullReplListener = _pushPullRepl?.addChangeListener({ [weak self] (change) in let s = change.status …} ) _pushPullRepl?.start()
  • 29. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 29 Automatic Conflict Resolution
  • 30. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 30 Queries • SQL Like semantics • Full Text Search Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
  • 31. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 31 Basic Query Example let searchQuery = QueryBuilder .select(SelectResult.all()) .from(DataSource.database(db)) .where(Expression.property("type") .equalTo(Expression.string("hotel"))) .limit(Expression.int(limit)) SELECT * FROM db WHERE "type" = "hotel” LIMIT 10 Response: [ { "id": "k_10019", "db_name": { ”type": ”hotel”, ”name": ”abc1" } }, { "id": "k_11029", "db_name": { ”type":”hotel”, ”name": ”abc2" } } ]
  • 32. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 32 Live Query liveQueryListener = query.addChangeListener({ [weak self](change) in … for (_, row) in (change.results?.enumerated()) { // handle result - row.toDictionary() } }); query.removeChangeListener(withToken: liveQueryListener ) Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
  • 33. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 33 Query : Pattern Matching & Logical Expressions let searchQuery = QueryBuilder .select(SelectResult.expression(Meta.id), SelectResult.expression(Expression.property("name"))) .from(DataSource.database(db)) .where( Expression.property("type").equalTo(Expression.string("landmark")).and( Expression.property("name").like(Expression.string(”%Engin__r%")))) SELECT ID, name FROM db WHERE "type" = "hotel" AND "name" LIKE “%Engin___%” • Royal Engineer Museum • Titanic Engineers' Memorial Like Wildcard Expression
  • 34. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 34 Query : Check for Null or Missing Properties let searchQuery = Query .select(SelectResult.expression(Expression.meta().id), SelectResult.expression(Expression.property("email"))) .from(DataSource.database(db)) .where(Expression.property("email").isNullOrMissing()) .limit(Expression.int(limit)) Null / Missing Check Expression SELECT ID, email FROM db WHERE email IS NULL LIMIT 10 • Nothing equivalent of “IsMissing”
  • 35. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 35 Query : Manipulating Arrays let searchQuery = Query .select(SelectResult.expression(Meta.id), SelectResult.expression(Expression.property(“public_likes [0]”))) .from(DataSource.database(db)) .where( ArrayFunction.contains(Expression.property("public_likes"), value: Expression.string(”Anne may"))) • No Array Support in SQL { "id": "k_10019", "name": "Awesome Hotel", "type": "hotel", "public_likes": [ "john appleseed", "jill doe", "Anne may" ] } Array Function
  • 36. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 36 Query : Parameterization let lowerCount = Expression.parameter("lower") let upperCount = Expression.parameter("upper") let searchQuery = QueryBuilder .select(SelectResult.expression(Meta.id)) .from(DataSource.database(db)) .where(Expression.property(”num_reviews"). between(lowerCount, and: upperCount)) let params = Parameters.init().setInt(10, forName: "lower").setInt(100, forName: "upper") searchQuery.parameters = params { "id": "k_10019", "name": "Awesome Hotel", "type": "hotel", “num_reviews”:50 } String stmt = "SELECT id FROM db WHERE num_reviews BETWEEN ? AND ?"; prepStmt = con.prepareStatement(stmt); prepStmt.setInt(1, 10); prepStmt.setInt(2, 100); Parameterized Query
  • 37. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 37 JOIN Inner JOIN Cross JOIN Left JOIN
  • 38. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 38 JOIN let employeeDS = DataSource.database(db).as("employeeDS") let departmentDS = DataSource.database(db).as("departmentDS") let employeeDeptExpr = Expression.property("department").from("employeeDS") let departmentCodeExpr = Expression.property("code").from("departmentDS") // Join where the "department" field of employee documents is equal to the department "code" of // "department" documents let joinExpr = employeeDeptExpr.equalTo(departmentCodeExpr) // join expression let join = Join.join(departmentDS).on(joinExpr)
  • 39. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 39 JOIN let searchQuery = Query.select(SelectResult.expression(Expression.property("firstname").from("employeeDS")), SelectResult.expression(Expression.property("lastname").from("employeeDS")), SelectResult.expression(Expression.property("name").from("departmentDS"))) .from(employeeDS) .join(join) .where(Expression.property("type").from("employeeDS").equalTo(Expression.string("employee")) .and(Expression.property("type").from("departmentDS").equalTo(Expression.string("department")))) SELECT employeeDS.firstname, employeeDS.lastname, departmentDS.name FROM `travel-sample` employeeDS INNER JOIN `travel-sample` departmentDS ON employeeDS.department = departmentDS.code WHERE employeeDS.type = "employee" AND departmentDS.type = "department"
  • 40. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 40 Full Text Search // Create FTS Index on name and content properties let ftsIndex = try Index.fullTextIndex(withItems: FullTextIndexItem.property("content"),FullTextIndexItem.property("name")) try db.createIndex(ftsIndex,withName: "ContentAndNameFTSIndex") let ftsExpression = FullTextExpression.index("ContentAndNameFTSIndex") let searchQuery = Query .select(SelectResult.expression(Meta.id)) .from(DataSource.database(db)) .where( ftsExpression.match("Mechanical")))
  • 41. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 41 Query Expression • Metadata • Pattern Matching • Comparison • Collection • Function • Parameter • Quantified • Bitwise Operator • Property • Aggregate • String • Collation • Regex • FTS • Null Check Operator • Arithmetic Expressions “Expression for constructing a Query Statement”
  • 42. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. 42 Resources • Couchbase Mobile 2.0 Beta Announcement : https://blog.couchbase.com/announcing-couchbase-mobile-2-0-beta/ • Blogs : blog.couchbase.com • Query Playground: https://github.com/couchbaselabs/couchbase-lite-ios-api-playground • Developer Portal : developer.couchbase.com • Couchbase Source : https://github.com/couchbase • Forums: forums.couchbase.com • Twitter @rajagp, #couchbase FEEDBACK: https://bit.ly/houstongroup
  • 43. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2018. All rights reserved. THANK YOU!