I had a similar question and Alistair Rutherford shared this article 
link with me.  It's exactly what I was looking for and may help you as well.

http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/


Justin

daekpony wrote:
> hi there - did you ever get an answer to whether you can ship an
> application with the database already populated? If you can, would you
> mind sharing the steps to do so with us?
>
> thanks!
>
> On Feb 18, 4:54 am, Gavin Aiken <gavin.ai...@imperial.ac.uk> wrote:
>   
>> Hey,
>> I have a plethora of data which is currently stored in 1000 different very
>> small text files, I want to store this data in an SQLite database as I feel
>> that this will be more space efficient and hopefully time efficient as I
>> presume a database query is faster than opening and parsing a text file
>> (please stop me now if this isn't the case!).
>>
>> The data does not need to be available to other applications and will be
>> used internally only. My first question is whether or not to create a
>> content provider anyway, is there any benefit to this?
>>
>> My second question is where to initialize the database, is it possible to
>> ship an application with a database included already populated? Do I have to
>> populate it in the onCreate method of the SQLiteOpenHelper subclass? If I
>> have to include the 1000 text files and read, parse and insert the data at
>> install time I have a feeling this would be slow. Is it possible for me to
>> populate the database now, dump it to a single file and then bulk insert
>> from the file in the onCreate method?
>>
>> I hope you get the jist of what I mean!
>>
>> Many thanks,
>>
>> Gav
>>     
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to