How do you bundle an app with a large database?

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

How do you bundle an app with a large database?

Postby Sweevo » Wed Feb 18, 2009 8:20 pm

Suppose you have tens of thousands of records or more.

A really bad way, I guess, would be to include a text or xml file and import it; this could take a very, very long time the first time the app is started.

A better way would be to include a dump of the database, and import that. Much faster, I guess, but it may still take a long time the first time, and after that the phone would have two copies, the dump and the live one, so it seems bad storage wise.

Would that be the best way? What am I missing?
Sweevo
Developer
Developer
 
Posts: 35
Joined: Thu Oct 16, 2008 9:27 am

Top

Postby MrSnowflake » Thu Feb 19, 2009 9:00 am

The database is the best way, but why can't you make the dump one dissapear?
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby bit » Tue Mar 03, 2009 8:32 pm

MrSnowflake wrote:The database is the best way, but why can't you make the dump one dissapear?
It's my understanding you can't remove files which come in your apk.

The best way might be to see if you can load your DB in your app during development, then see if you can pull that db file into your project so in the future it gets bundled in your apk and when you deploy your app it can just use the database file.

Right now my simple Chinese/English dictionary loads the db from two text files in a thread on first startup. Not a great solution, but good enough for now.
bit
Junior Developer
Junior Developer
 
Posts: 19
Joined: Thu Dec 11, 2008 7:30 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests