Which database should I use for my app?

35
Nawaz Dhandala Hacker at CloudBoost.io [email protected] Which database should I use for my app? and Introduction to CloudBoost.io cloudboost

Transcript of Which database should I use for my app?

Nawaz DhandalaHacker at [email protected]

Which database should I use for my app?…and Introduction to CloudBoost.io

cloudboost

Agenda

cloudboost

• Different types of databases

• Which database is right for my app?.

• Why use CloudBoost.io?

• Getting started with CloudBoost.

• Building your first web app.

• Using Data-storage, and real-time.

Different types of databases.There are quite a few types of NoSQL databases out there. Some of them are :

• Relational Database. For ex : MySQL• Document Databases. For ex : MongoDB, CouchDB• Graph Databases. For ex : Neo4j• Search Databases. For ex : ElasticSearch• Column Oriented. For ex : Cassandra• Distributed Cache. For ex : Redis

cloudbooost

Relational DatabasesPros :• Transaction support and ACID • Simple queries to retrieve the data.Cons:• Scalability is difficult. • Little support for complex objects video, images,

Geospatial and more.

Examples : MySQL cloudboost

Document DatabasesPros :• Simple JSON Document Storage• Extremely scalable – Can scale out very well.

Cons:• No relations or joins. • Most of the databases have no transaction support.

Examples : MongoDB, CouchDB cloudboost

Graph DatabasesPros :• Excellent at storing relations between data.• Relational queries / joins are extremely fast.

Cons:• Most of the graph databases are very hard to scale out. • Can be conceptually difficult to understand at first.

Example : Neo4j cloudboost

Search DBPros :• Excellent at full-text search and other search queries. • Can scale out well.

Cons:• No relational support. • Bad at MapReduce, No transactions.

Example : ElasticSearch cloudboost

Column-orientedPros :• Fastest writes. Good for storing log / sensor data. • Excellent scalability and high availability.

Cons:• No relational support. • No transactions.

Example : Cassandra cloudboost

CachePros :• Fastest read / writes. Good for storing data you need all the

time. • Scalable and can be distributed over multiple machines

Cons:• Not persistent.• It stores data on RAM which is expensive.

Example : Redis cloudboost

Problem?No database available today can

do everything which you need for your app.

To solve this…Companies built “multi-model”

databases.

For ex : OrientDB = Document + Graph DatabaseFoundationDB = SQL + Document Database

cloudboost

Problems with Multi-Model databases?

They have two / three data-model supported which still does-not cover all the scenarios for the

requirements of an app.

Solution?Pick and use multiple databases

to build one app.

…and this is called

“Polyglot Persistence”

For example,

If you’re building an e-commerce application…

Source : http://martinfowler.com/bliki/PolyglotPersistence.html

My App

Document Database

SearchDatabase

Logs

Graphs for relations

Which looks like…

Using multiple databases to build one app is an excellent

solution but…

As a developer you need to…

Hire an expert for

each database.

Learn different

databases yourself.

Sync data

betweendatabases

Manage different

databasesyourself

Which means…

Longer go-to-market time

More Development and maintenance costs

cloudboost

Why CloudBoost.io?

CloudBoost is a database service that not only does data-storage, but also search, real-time and a whole lot more.

We leverage the strengths of multiple databases and give you one simple API to use which will help you build much richer apps in half less time.

cloudboost

My App

Document Database

SearchDatabase

Logs

Graphs for relations

Before…

Document Database

SearchDatabase

Logs

Graphs for relationsYour App

CloudBoost

API

…And Now

A very simple API that does…

SearchStorage

Relations TimeSeries

Real-time

GeoLocation

For Developers

We AutoSync your Data

We manage Databases

A ton of features

Save Time

Simple API

Getting started with CloudBoost.io

Step 1 : Create your app

cloudboost

Step 2 : Create a new table

Create a new table with name “Custom”

cloudboost

Step 3 : Create a new column

Create a new column “name” of type “text” cloudboost

Step 4 : Get your App Keys

cloudboost

Step 5 : Link the JS SDK

Step 6 : Init your app.

cloudboost

Step 7 : Save Data

“Custom” is the name of the Table.

Step 8 : Adding real-time

You can listen to any real-time notification event from the database service. Here for example, the event fires whenever a custom table object is inserted into the database.

cloudboost

That’s it folks! Build your next big thing on

CloudBoost.io. #BeginToday

For more features, visit – http://docs.cloudboost.io