Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

iphone

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!

like image 637
Gijstebrij Avatar asked Feb 27 '23 14:02

Gijstebrij


2 Answers

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.

like image 131
Marcelo Cantos Avatar answered Mar 23 '23 00:03

Marcelo Cantos


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...

like image 37
Rich Avatar answered Mar 22 '23 22:03

Rich