views:

90

answers:

1

Hi, I'm doing an app which needs to store large data. Just like find out what is best way to do it. Where should i store it? in document folder? or in caches folder? or there a better way of storing large data? Thanks in advance.

+6  A: 

It depends on the structure and the type of your data. If you have a relational data structure then you may consider SQlite or CoreData, if you have an intensive Object-Oriented data, then you should consider Core Data. It also depends on your skills with SQL and ORM frameworks when CoreData is higher level and use SQLite.

If your data is images, then you can store in /Library folder of your application. If your data is JSON-like format, then you can store in plist file (which can also be in /Library folder)

vodkhang
Core data is much less work than SQLite in my opinion, it is higher level, and may use SQLite as the storage medium.
Alex Gosselin
I think it depends on your skills. Many people already has great level of SQL in their belts. Then, using CoreData means more learning and for some simple works, you may not need CoreData
vodkhang
If you can handle the Core Data as SQLite, it is the most efficient way to manage data in small device. It is much advance than .plist but thumbs up for the Core Data system for handling data with performance in relation table.Funny thing is SQL and Plist (XML type) very associated each other as performance.
Yoon Lee
Thanks for the reply guys.my data is mp4 data. i have seen samples of code using SQLite but most of them are storing strings or integers. how do i store the nsdata using SQLite? is it possible to provide some code snippets on SQlite or CoreData. Thanks
tan
I don't recommend using SQLite to store NSData, usually, people will save the mp4 into /Library folder, get back the file path, and store the file path into SQLite or CoreData
vodkhang