SQLite isolated from other apps - sqlite

I cannot find an answer after searching on the internet, but if my app creates a database on mobile device named 'myDB' with a table called 'users' what happens if another vendor's app on the user's device creates the exact same name? Are the databases isolated by app?

If you're talking about a Android device: yes, other apps can't access your app database. (unless they have root access)
Android provides full support for SQLite databases. Any databases you create will be accessible by name to any class in the application, but not outside the application.
http://developer.android.com/intl/pt-br/guide/topics/data/data-storage.html#db

Related

Enabling SQLite in Azure service?

Getting started with Azure services here and I'd like to be able to have a "lighter" datastore for smaller solutions. Can anyone explain how to enable/setup SQLite with an Azure service? Is that done from Visual Studio or do I have to enable it while deploying to Azure?
I have googled every conceivable combination of keywords I can think of and came up with nothing but a feeling it's "easily achievable" but no hints as to hos it's done.
What I have is actually a mobile back-end that is using SQLite but I have no clue how I did that! There where certainly no datastore-setup wizard when I created it but when I go to the "Quicklinks" to download staged projects for clint projects I see that the back-end is indeed configured to use SQLite. I have tried a couple of different approaches to try and reproduce it but so far I have failed.
As far as I know, the azure mobile app doesn't support enable the SQLite from the azure.
In the azure portal you could only enable the azure table storage and azure sql database as the mobile app's backend database.
You could see this image:
If you want to use SQLite in your mobile app's backend, you need enable it by yourself in the project.
You need firstly install the System.Data.SQLite package and replace the connection string as SQLite connection string. At last you need deploy your mobile backend to the azure with the SQLite file. More details about how to install the SQLite in your mobile beckend, you could refer to this article.
Notice:
1.SQLite EF provider doesn't support the EDM.DateTimeOffset type. But the azure mobile app quick start backend sample use the DateTimeOffset. So if you want to use the SQLite as your mobile app backend, you need write your own model.
The mobile app backend EntityData class:
2.After you published the application to the mobile app, you need also copy the SQLite.Interop.dll to your application root folder.

Hosting SQLite DB on Azure Storage?

I need to host an SQLite database on Azure that will be shared among several web apps. My only options seem to be Azure Blob or File Storage (since they got rid of the "Azure Websites" that provided dedicated storage shared among web instances). However, there does not appear to be any way to map an Azure Storage share to a drive that the Web App will recognize, and thus no way to generate a path that SQLite can use. And obviously, SQLite can't use REST APIs to access the DB without tremendous hacking in the SQLite VFS.
So I'm wondering if anyone has successfully hosted an SQLite DB on Azure Storage such that it was accessible to a Web App?
Azure Web Apps (formerly known as Web Sites) still exists, and still has durable, shared storage across your web app instances.
You cannot use a blob to hold SQLite, as it is not compatible with file I/O (it has a REST API for access). And you cannot simply attach an Azure File Storage volume (you can use one, via API, but cannot mount it to an Azure Web App instance).
Nothing's changed with Web Apps: just place your SQLite database in a directory underneath your app's root directory.

android app and realtime message with Meteor

I am learning meteor and making simple chat app then this question hit my mind..
If I am making web app then that is fine because all the user will access from save server and database but what about mobile users..
Lets say I am making android app and I want to build it.. When I build the app will it give me Mongo database along with apk or I have to install it manually ?
Second i can think of its do everything in the same database and just make browser for the app..
But what I want to store per user data in their mobile.. that is no related to my database ?
In my chat app in the browser it is working in realtime but what If i build and make apk for android with different database ..
I just want to know what would be the best approach if I am making a messaging app ? I am confused on database .
Thank you
The database is always remote MongoDB on the server where your server code runs.
For example your server address is http://someserver.com. This is where you publically deploy your application.
While building the apk, you need to specify the --mobile-server attribute which tells your mobile application where to point for server code and database.
If you host your database on some MongoDB hosting providers like compose.io then you need to specify MONGO_URL environment variable while building.
To cut it short, MongoDB is neither on apk nor on client (they have something called minimongo on client which is definitely not your actual database) but it is on the server where you have hosted your application.
Good Luck!

symfony2 on/offline web application

Im looking for the best way to build an on/offline application with symfony2. I need some advice here:
Users can access the application from navigator on their computer or from tablet (like iPad)
When there is no connection the application must run in offline mode
Data should be stored locally until the detection of a connection
Local data must be syncronized with server data
the question is : what is the best approach to implement this behavior knowing that the application must be developed with symfony2 (normal behavior).The main problem is the offline mode. Should i use HTML5 local storage or SQLite?
and what is the best approach to syncronize data between the two modes (from server to local/or from local to server)

How to sandBox db file in windows store app

i m currently developing a windows store app for surface.i use sqlite for database tasks.but the db file saves in APPData folder as separate file.i want to make it more secure.how can i do that?if sandboxing is a solution,then how could i sandbox the db?
Windows Store apps run with (a limited set of) the user's permissions. Anything the app can get to the user can get to. Sandboxing prevents the app from affecting the rest of the system. It doesn't prevent the system (or the user) from getting to the app.
To secure the database from the user you'd need to keep it off-system on a site that you control.
On system you can make it more difficult for the user by encrypting the database or its contents. I haven't looked at it closely, but a quick search found that SQLCipher Commercial Edition supports Windows Runtime apps. If you prefer to encrypt it yourself take a look at the Windows Runtime's data protection API.

Resources