ewein
ewein

Reputation: 2735

sqlite database for mobile App

I am making a mobile app using the CoronaSDK and Lua. I am using sqlite to store information about each user. I am doing the following to setup the database file.

require "sqlite3"
local path = system.pathForFile("data.db", system.DocumentsDirectory)
local db = sqlite3.open(path)

My question is, does this create a separate file for each user storing only that users information or does it create one file holding all user information. Also, is the file stored on the users mobile device or on Corona's side?

Upvotes: 1

Views: 340

Answers (1)

SatheeshJM
SatheeshJM

Reputation: 3633

All files created by your app are stored in your mobile device only! And so will your database file.

Regarding the other question, It creates 1 file in your user's mobile storing ONLY HIS data. There will be a single database file in every mobile device that runs your app storing their respective info.

To store ALL USER DATA, you must store them in a remote server or something.

Upvotes: 1

Related Questions