aspose file tools*
The moose likes Android and the fly likes Android Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Android Database" Watch "Android Database" New topic
Author

Android Database

hazim aleid
Greenhorn

Joined: Mar 08, 2006
Posts: 17
Hello all,
i have questions about the DB for the android,
1- i use the data as xml file, it's around 6500 row, so is it recommended to use the database or keep it xml?
2- if i'm using the database, is there a method to insert the data to the database one time (when install the application), and if i uninstall the application, how can i delete the tables from the database?

thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41874
    
  63
Does the data change during the lifetime of the app? If so, a DB would be a better approach, because it's easier to update than an XML file. If there's a substantial amount of data with which the DB needs to be prepopulated upon installation, then shippping that data with the app as XML might be the way to go.

The DB will be automatically deleted once the app is uninstalled..


Ping & DNS - my free Android networking tools app
hazim aleid
Greenhorn

Joined: Mar 08, 2006
Posts: 17
Thanks Ulf Dittmer,
my application only read the data, it's static but it's long rows around 6000 rows, so i think it's not recommended to read these rows from the xml, and keep it on the memory!!
true, please your advice.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41874
    
  63
6000 records is not a large number these days, even for a mobile device (assuming that each record isn't 100KB in size). Keep in mind that Android manages memory for you, and will close applications if it needs more memory to work with.
hazim aleid
Greenhorn

Joined: Mar 08, 2006
Posts: 17
Thanks so much
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Android Database