David
David

Reputation: 292

SQLite database limits in Android

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

Upvotes: 10

Views: 13864

Answers (3)

Nick Campion
Nick Campion

Reputation: 10479

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.

Upvotes: 1

Vikas Patidar
Vikas Patidar

Reputation: 43349

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

Upvotes: 2

Amokrane Chentir
Amokrane Chentir

Reputation: 30385

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!

Upvotes: 1

Related Questions