Android Performance : Flat file vs SQLite

后端 未结 2 1338
轮回少年
轮回少年 2020-12-06 09:25

There are few questions related to this topic on stackoverflow, But I didn\'t get the proper answer. I have some doubts on performance of flat files, Is it better to use

2条回答
  •  醉酒成梦
    2020-12-06 10:08

    It depends on your requirement.

    If your storage data size is structured-bulky in size then i suggest you for SQLite. On the other hand if the data size is just a single or few lines then flat file is best option.

    What makes difference between them is, SQLite stores data in structured format, so it will be easier to find a record from multiple set of records which is very tedious process in case of flat file.

    However when if you are storing blob kind of data then it is suggested to use combination of both, SQLite and file system both. i.e. store the image/sound/video data as file format and store their path in SQLite.

    Also visit this accessing performance.

提交回复
热议问题