Raw resources versus SQLite database

前端 未结 3 500
醉酒成梦
醉酒成梦 2020-12-02 00:43

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 hand

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 01:26

    Cristian is right. Database gives you better access time and allows to modify data in very convenient way. XML might be a better idea in case of tree-like data structures.

    In my opinion there are 2 question here:

    1. what kind of data are you storing?
    2. Do you allow user to modify this data (for example in application or using Notepad)

    There is also 1 big disadvantage of XML - it is eventually open text. So anyone can read it. To prevent it, you would have to encrypt the data (and this means additional effort). In case of XML, using marshaling techniques (JiBX, Castor, JAXB) might be convenient and might also lower memory consumption.

    Please describe what kind of data you are storing in DB, so we might come up with better answer.

提交回复
热议问题