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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 39547
    
  27
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 - updated with new look and Ping home screen widget
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: 39547
    
  27
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
 
Similar Threads
How to upload database
Android - update SQLite
how to push data to database through wcf?
lightweight orm mapper
sending xml file from server to client dynamically.