1

i have project, which is building a mobile app ( android)

this app require the user to log in by providing his email and password then the user can start use the app.

it is an IQ test app so i have set of questions and answers..

My question is which database should i use? i choose sqlite but then i read that is Local and can not be accessed by any other device! and i need an online DB that can by accessed by any device so the users can log in and retrieve the test answers.

gradreab
  • 21
  • 4

2 Answers2

2

You should use SQLite.

Actually, you can write a class that will download your Sqlite Database from a server so the users can download the database in any device. When whatever you read said that the SQLite is Local, I think it meant that only the App where it is used can access (read and write) to it. Barring of course instances wherein other devices are rooted, in which case they can see the Database using other Apps.

Create your SQLite Database, upload it to your server, and download it.

Razgriz
  • 7,179
  • 17
  • 78
  • 150
  • @Razgir what if I've a database that stores information of different users and the users can add or delete some fields later? How can I sync my SQLite database then? – Ahsan Aug 22 '17 at 01:37
  • @Weaboo post a question regarding your use case scenario, so that it will be visible to a wider range of users who can help you. – Razgriz Aug 22 '17 at 03:22
0

You can use SQLite for local use

For server database you can use MySql , from android client you can send data to server database (that is mysql) through JSON parsing and php scripting (php scripts will be uploaded to server).

see this link

Connect mySQL with Android

Community
  • 1
  • 1
Jamil
  • 5,457
  • 4
  • 26
  • 29