开发者

Which is faster when reading large amounts of data: XML or SQLite

I will be developing a dictionary app for both Android and iPhone. The data will be embedded within the app, and it consists out of approximately 100000 words, with genus and plural form. Is it better to use a SQLite database or can I just stick to XML? Somehow SQLite sounds more efficient, but I thought let's just 开发者_运维问答ask.

Thanks!


That's a bit of an apples and oranges comparison. SQLite is a whole lot more than just a file format. The answer depends on whether you just want to load everything into memory on startup (XML, or better still, CSV will probably suffice), or you want to be able to query the data, in which case SQLite is a far better choice.


You will want to be performing searches, so SQLite will definitely be quicker. You will need some kind of function to install your data from the distributed executable into SQLite, of course...


XML is better suited for storing data trees (hierarchical data structures), and for data exchange.

SQL is a better fit for data tables.

In your situation (from what little you've shared with us), SQL (and therefore SQLite) sounds much more efficient.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜