Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite database limits in Android

Tags:

android

sqlite

I'm planning Android app which extensively uses local DB. DB would contain approx 15 tables , properly normalized (FK, PK etc). 4 Main tables would have up to 1000 entries and about 15 columns with text, date/time and numbers only.

I wondering whether this configuration is feasible on Android phone/tablet. Am I pushing sqlite and Android OS to the limits? I cant find any firm figures about sqlite limitations on Android OS.

Many thanks

like image 442
David Avatar asked Feb 20 '11 16:02

David


3 Answers

I compelety agree with @Amokrane's answer but insure that your database should also have backward compactibility. Because you are saying that your database is properly normalized (FK , PK etc). And here Foreign Key support is only available since the SQLite version 3.6.19 therefore this constraint could only be applicable on the Android 2.2 FroYo (which has SQLite 3.6.22 Version) and the above versions.

For more information refer : http://www.sqlite.org/foreignkeys.html

like image 118
Vikas Patidar Avatar answered Oct 28 '22 04:10

Vikas Patidar


This official SQLite limits page contains many information that you might find interesting.

By the way, I don't think you are pushing SQLite to its limits 15 columns/ 1000 entries is not that huge!

like image 25
Amokrane Chentir Avatar answered Oct 28 '22 05:10

Amokrane Chentir


I've provided an answer to a similar question here. There are details of soft limits and size limits for the table. As far as @Amokrane answer, you'll also need to be aware of limitations not imposed by SQLite, but by android. 50mb is the current maximum app size and there are issues with accessing large datasets on device. Take a look at that answer.

like image 35
Nick Campion Avatar answered Oct 28 '22 06:10

Nick Campion