SQLite database limits in Android

后端 未结 3 1452
慢半拍i
慢半拍i 2021-02-20 14:03

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 an

相关标签:
3条回答
  • 2021-02-20 14:45

    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

    0 讨论(0)
  • 2021-02-20 14:59

    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!

    0 讨论(0)
  • 2021-02-20 15:04

    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.

    0 讨论(0)
提交回复
热议问题