vendredi 22 avril 2016

Ionic: sqLite & PouchDB or NoSQL

I am developing a hybrid app with Ionic. Currently I am using sqLite (relational) as I come from a MySQL background.

As I need to sync my database quite frequently (usually after each change - either in the app or on the server) I was looking for some solution before investing time to create my own service (do not reinvent the wheel).

I came across a nice tutorial from Nic Raboy ( where he explains how to use PouchDB for easy syncing.

So far so good - but I could not yet figure out if or how I can use PouchDB with my existing sqLite database or if I have to switch entirely to a NoSQL database.

In case I have to switch to NoSQL I have the next issue: How do I have to design my "relations" in a NoSQL db?

Let me ask in detail:

I have a SQL statement to retrieve data from 2 or more tables like this:

SELECT c.title,,
FROM app_user u
INNER JOIN rel_user_categories ruc
ON ruc.uid =
INNER JOIN app_categories c
ON = ruc.cid

or this:

SELECT av.venuename, av.latitude, av.longitude, ao.title,, ao.beacon
FROM app_offers ao
INNER JOIN app_venues av
ON = ao.venue
ORDER BY ao.expires ASC

Is there a way to fire some queries that do exactly the same if I use NoSQL? I was using Google now since about 1 day and did not come across any solution.

Thanks in advance for your help!

Aucun commentaire:

Enregistrer un commentaire