ios - What is best way to store long term data in iPhone Core Data or SQLite? -


I am working on the iPhone App Targeting 3.1.3 and later the SDK. I want to know the best way to store user long-term data without losing performance, stability and security.

I know, I can use core data, plist, and SQL-Lite to store user data. In custom formats. But, want to know who is good to use without compromising with app performance and scalability in the near future.

It depends on the "user data" word size, complexity and usage includes wide scales Each of which is included in different optimal storage strategies.

(1) If the size and complexity are low and the usage is primarily controlling the app, users use the NSUser defaults to store the data in default.

(2) If the size is small and the complexity can be managed by the array, the dictionary etc. then calculates the store size in a plast because all the data stored in Plast is stored in a block in memory Is loaded.

(3) If the size is very large but the complexity is low, a large number of an index card system such as template records, then use the direct SQL, to find and save simple and repetitive information in a very large DB. Is fast for

(4) If the complexity is too high, then use the shape without using core data. Core data is specially designed to manage complex information, if the size is small, then XML Use store. If this is large, then use the SQL Store.

As I have acquainted with core data, I myself automatically use it for almost everyone except the user default. It has a detailed learning curve, but once you master it, you have a powerful and easy tool for managing application data. I probably use it in situations where it is not optimal because it increases the time of development


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -