It depends on the complexity of your data model. Recently, I have learned something like this, and here is what I learned. The most popular iPhone storage methods are:
- Plist
- Good for small amounts (hundreds of Ks) of hierarchical data.
- Itβs bad if the relationships or queries are complex (since you need to write code).
- Very easy to learn .
- Supports array, dict, string, data, date, integer, real, boolean.
- You can save it as XML, which you can edit and transfer, or as binary files, which are faster.
- Basic data
- This is a graph manager of objects with search and permanent functionality.
- You need a good few hours of training .
- Easy to use if you configured it .
- Better than plist because it allows you to manage graphs of objects, generate an object model, write queries, undo / redo, transfer changes to modified data models, manage memory and handle concurrent access.
- Better than SQLite because:
- Performance is similar, and development speed is faster.
- Creating objects is faster.
- When objects are in memory, query execution does not require a backend search (usually either memory or SQLite).
- Sqlite
- Database.
- Better than basic data when the operation does not require you to add objects to memory. Example: update, delete and select 1 (see, If something exists).
- It has a full text search if you compile the extension .
- Harder to learn. Easier if you use a wrapper: FMDB , egodatabase .
If you can leave with plist, do it. If you see that the amount of code you have to write works too much, then switch to Core Data. Only if you are an expert and absolutely need performance , use SQLite (unless, of course, you already know SQLite, not Core Data).
source share