Android – sqlitedatabase vs file store
I want to store structure type data (i.e. call log information, such as name, number, number type, date, time, duration). Which method is the best and which method is faster? Sqlitedatabase (making tables and inserting, deleting logs) or using file storage (which means creating a class for all parameters and writing their objects in the file using input / output stream and serializable) or another way I've heard of is XML parser, but I don't know this
Please help me. Thank you in advance
resolvent:
It depends on what you want to do
If your goal is speed, SQLite will provide you with strict operation (especially if you wrap multiple inserts into transactions). SQLite has been optimized for all the contents you mentioned, and you can easily take advantage of the speed it can provide
If portability is your goal, files may be a little easier. Files can be easily moved back and forth, and SQLite may require more effort
If searching is your goal, you won't use SQLite because it is very good at searching and filtering results