What is the safest way to store offline data that can be synchronized with a remote Sql Server if we build an app using Xamarin on IPhone?
We are currently investigating SiaqoDB and Sqlite.
SiaqoDB does have samples for this, however, the database itself seems somewhat unknown and the community around it is small.
Sqlite has a huge userbase but there don't seem to be any out of the box sync support for this.
Are there other alternatives?
How does SiaqoDB compare to Sqlite here?
I dont know SiaqoDB but i used SQLite on a Xamarin project a while ago.. If you use the SQLite component from Krueger systems Krueger you will have a working database, without synchronization. You could also go for Zumero SQLite, which includes synchronization to their own server, but i havenĀ“t tried them so i cant compare the two.
Related
I'm making an in-house application for a company and they want me to use Phonegap for the mobile application. After searching, I decided to go on and use SQLite plugin for the local storage but they have this requirement that when the device goes online all the data on the local storage will synced automatically to the remote MYSql db. I read about deferred functions in jQuery but I'm not quite familiar on how to use them.
Are there any alternatives to achieve this requirement?
I'm currently investigating to achieve a similar goal.
I need to develop an IONIC/Phonegap app that can potentially do CRUD operations with the followings DB engines: MySQL / Postgres / Microsoft SQL Server / Oracle (not simultaneously).
TypeORM seems to be the solution, but I still couldn't connect from Android device to remote MySQL DB.
If you work with TypeORM over NodeJS directly is very easy to have an example up and running and do some CRUD operations with the supported DB engines (just follow the examples and documentation in the previous link).
I'm asking at https://github.com/typeorm/typeorm/issues/548 if anybody has achieved an Android-MySQL connection using TypeORM.
There is a lot of confusion when it comes to ionic 2 storage. There was a lot of changes in the new ionic version as Storage was moved to #ionic/strage . I am new to Ionic so some of the things are confusing for me. I have web-development background. From the documentation,
A simple key-value Storage module for Ionic apps based on LocalForage,
with out-of-the-box support for SQLite. This utility makes it easy to
use the best storage engine available without having to interact with
it directly. Currently the ordering is SQLite, IndexedDB, WebSQL, and
LocalStorage.
Installation
npm install #ionic/storage
If you'd like to use SQLite as a storage engine, install a SQLite plugin (only works while running in a simulator or on device):
cordova plugin add cordova-sqlite-storage --save
What I would like to know is, what happens when I run this in browser ? Where does it store the data? What would happen if I dont use cordova-sqlite-storage ? Where does it store the data then?
Ionic also supports SQLite plugin natively to store data in SQLite database .
import { SQLite } from 'ionic-native'
How is it different from Storage other than the fact that there is a fallback to IndexedDB, WebSQL, and LocalStorage ?
I hope my thoughts are in the right direction. A clear answer on how these modules work would be really helpful.
Ionic Storage is the first module written with proper web fallback in mind.
One near-term goal we have with Ionic is enabling devs to build 99% of their app in the browser. It's a much faster workflow. This means support for native plugins that have web fallbacks, as well as better mocking for ones that don't. - Max Lynch on Twitter
By default when running, #ionic/storage will prioritize the storage methods this way:
When running in a native app context, Storage will prioritize using
SQLite, as it's one of the most stable and widely used file-based
databases, and avoids some of the pitfalls of things like localstorage
and IndexedDB, such as the OS deciding to clear out such data in low
disk-space situations.
When running in the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
- Official Documentation
So when your app is running in the browser (or on a device without the SQLite plugin) it will detect that SQLite is not available and will use IndexedDB/WebSQL instead.
How is it different from Storage other than the fact that there is a fallback to IndexedDB, WebSQL, and LocalStorage?
The SQLite plugin gives you low-level access to an SQLite database, which means you have to care about creating/updating your schemas, and write queries.
#ionic/storage is a wrapper which abstract away the differences of LocalForge and SQLite and provide a simple, unified API to store key/value pairs.
Also it takes care of serializing/deserializing of your objects.
From my understanding of the Ionic 2 RC Storage module, when you are running in the browser you are now only able to store key-value pairs (LocalStorage). You are currently not able to store anything more than that, so you should check out other options like PouchDB and LocalForage if you need full SQL support. This definitely isn't ideal for progressive web apps.
A rookie question. Can any one explain when it is better to go with SQLite storage in sencha touch and when to go with use data stores.
regards,
I don't think they are mutually exclusive.
Sencha Touch stores come into their own when you have any kind of data that needs displaying in the viewport (and that data might change)
Sencha have a sql proxy that will work on these stores with a browser's websql implementation or a native app's sqlite implementation (with the aid of a cordova/phonegap plugin)
The main reason why you'd use SQLite on a native app is to circumvent the 5mb localstorage limit. You can't get around this limit for webapps though.
Pardon if this sounds noob.
We are current working on a mobile application that utilizes the Cordova framework. We would need to store data on the device, and such had decided on to use a database system.
We understand that for db storage, Cordova supports the WebSQL API, but since currently W3C stopped the development on WebSQL, we would wish to use a native SQLite database.
However, we do have a database file that are created via the WebSQL API. I understand that WebSQL actually utilize SQLite underneath(correct me if i'm wrong), but would the file display the characteristic of a WebSQL database? such as the file size limitation on mobile device?
The file size limitation is implemented in the particular copy of the SQLite library that is used to access the database, not in the database file itself.
Please note that W3C's (lack of) endorsement does not necessarily influence whether Cordova continues to use WebSQL.
currently I am writing a Windows 8 App with Sqlite as a database. I want to give the user the ability to view his data in every instance of the app on any device. Usually this problem could be easily solved by using a online database like Windows Azure. But this is not an option in my case.
Is it a good idea to use Microsoft's free service "Skydrive" as a platform to synchronize database files among several devices? Does somebody know any open source projects or blogs that are dealing with this problem that could save me some time for writing the necessary code?
If it's a bad idea, which other options are there that I could use. I want to keep Sqlite as the database for my App.
I am glad to get any kind of feedback or links to resources that might help me.
Best regards
Philipp
imo it isn't a good idea cause the access to db files is to easy. Ofc you can say that access to database files is easy cause you need to just know the app data path to package of your app but still it`s much more difficult than just opening skydrive. And think what would happen if someone would make this directory on skydrive as public.
I would combine local db and online db. Online db as a service for synchronizing data and local db for normal work.