Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Android SQLite

 
Redan Hassoun
Greenhorn
Posts: 26
Android AngularJS Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I am pretty new in Android SQLite. and i`m going to develop an application with a local database;
my question is : if the database is too large it would take too much space on the application storage if we download it from server
on the first launch - and it would take too much time to load.
is it a good convention to have the whole database stored in the local storage of the application ?
or there is some wize method to do that ?
 
Tim Moores
Bartender
Posts: 3135
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're afraid of the DB becoming too large, how about keeping it on a server, and accessing it via a REST web service?
 
Redan Hassoun
Greenhorn
Posts: 26
Android AngularJS Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:If you're afraid of the DB becoming too large, how about keeping it on a server, and accessing it via a REST web service?

The purpose is more learning SQLite and having some idea how it works.
And my question is because i wanna know how it is done in general , like , in big projects where the database is huge.
Do they load the whole database in the first launch from the server ? , i don`t think it makes sense
 
Tim Moores
Bartender
Posts: 3135
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, it doesn't make sense. Big databases are kept on a server, possibly in a relational DB such as MySQL or Postgres (assuming a relational DB makes sense for the problem at hand).
 
Ron McLeod
Bartender
Pie
Posts: 1047
65
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This developer article talks about distributing apps which need large assets using APK Expansion Files.  It may help answer some of your questions.

If there is a need to keep the application+database storage small AND the amount of data you will need at any given time is not large AND your app doesn't need to work off-line, then what Tim suggested is a good solution.  In addition, to reduce the quantity of network data, you could locally store copies of the data retrieved from the server for later use, and remove the less frequently used data when you reach the high-end of maximum amount of storage you want to consume.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic