Raw resources versus SQLite database

I'm creating an application that will use a lot of data which is, for all intents and purposes, static. I had assumed it'd make most sense to use a SQLite database to handle that data. I'm wondering if it makes sense to just use an XML file(s) and then access it as a raw resource. Bear in mind that there's likely going to be a LOT of data, to the order of hundreds of separate pieces.

Am I right to assume SQLite is best, both in terms of memory management and overall design considerations or does SQLite not make sense if the data is basically static?


Solution 1:

In fact, SQLite seems to be nonsense if the data is static. However, if what you are going to manipulate is a lot of data you should use it:

  • It will be easier to:
    • Retrieve data
    • Filter data
    • Sort data
  • Using XML files will cause some performance problems because of the way in which SAX or DOM parses XML.
  • It will be easier for you to update that set of data in the future (imagine that you want to add more data in the next release)