Search code examples
iphonesqlitecore-datansdocumentdirectory

iPhone Database performance


which tool is best for Database Management in iPhone Development

  1. Core Data
  2. SQlite
  3. NSDocuments directory

I want to store 3 or 4 object details ex. User, user's messages etc..


Solution

  • Regarding your question

    1.if you are really faimalary with core data that is how to handle it in multithreaded environment and the memory management specially for one to many and many to many relationship then core data is really advantageous. Storing and retrieving can be done easily.

    2.Sqlite is advantageous in a situation where you have multiple table and you want to retrieve some data from db by joining then in that case you can write some simple query and you can retrieve the data easily.

    3.Document directory you can use it if you have very large amount of data that 40-50mb then you can directly store that data in to some file in the document directory. Sine storing this much big amount of data in db will cause memory problem.

    As you are planning to store 3-4 entry then you can use sqlite or core data any of them. If data size is too huge then directly store it in to document directory in some file.