I have a sqlite database that gonna be filled from a webservice with intially 1000 record , then i will insert more record in it each time i need to do. my question is where to store the sqlite database in device in a way to keep inserting ( either in internal or external memory) i.e if i store the database in internal memory and when a internal memory get filled i can move it to external and keep inserting OR if i store it in the external storage and the external storage get filled and there is an available space in internal i can move to internal and keep inserting data .. i am very confused about this can you help me
any suggestion or links please
Following Answer I am giving on the based on my personal experience.
First Suggestion ( Internal/Phone Memory )
When you are storing database in Internal Memory, then for the Performance it is very good. Because your Application will be installed in the Internal Memory, so while inserting 1000 Records and other record ,for the application it would be more easier to access the database. Application’s performance will be very nice. But when it comes to Memory limitations, when Internal Memory will get filled more than enough then your device’s performance will be down. So Internal Memory is best till medium level database.
Second Suggestion ( External Memory, SD Card )
When you are storing database in external Memory like SD Card, then for performance , application performance’s will be bit slower than Internal Memory. However this won’t be significant for medium level database. When there is very few data then performance will be same in both the cases. Now when you are using External Memory, then you have large size of data storing. I do not think it will never get filled fully . But in case of large number of records performance will be down. Sometimes it may be possible that application crashes.
I’m not sure this is a good idea. If you have the webservice which can provide you the data you need, you should use local databases just to cache a small portion of the data. Otherwise, as you just said, you’ll end up filling both internal and external memories.