Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core Data Limitations for iOS

Is there any limitations exist in Core Data? e.g; how many max rows can be in a table/Entity? How much data can reside in the DB?

In general if some document can describe all kind of limitations which exist inside the Core Data (for iOS)?

Update: w.r.t answer given by @TechZen, my question was implied to the fact that I/Core Data will be using sqlite at the backend. But to just clear the point, I am intended to use sqlite and when I am talking about limitations of Core Data, I am indirectly asking limit of sqlite (database store).

So is there any limitations imposed by core data other than the limitations of the sqlite when we are talking about iOS environment?

like image 923
itsaboutcode Avatar asked Apr 19 '11 13:04

itsaboutcode


People also ask

Should I use Core Data iOS?

The next time you need to store data, you should have a better idea of your options. Core Data is unnecessary for random pieces of unrelated data, but it's a perfect fit for a large, relational data set. The defaults system is ideal for small, random pieces of unrelated data, such as settings or the user's preferences.

What is Core Data in iOS?

Core Data is a framework that you use to manage the model layer objects in your application. It provides generalized and automated solutions to common tasks associated with object life cycle and object graph management, including persistence.

Why is Core Data used iOS?

Overview. Use Core Data to save your application's permanent data for offline use, to cache temporary data, and to add undo functionality to your app on a single device. To sync data across multiple devices in a single iCloud account, Core Data automatically mirrors your schema to a CloudKit container.

How can I view Core Data in iOS?

Open Xcode and create a new project by choosing the Single View App template form the iOS > Application section. Name the project Notes and check Use Core Data at the bottom. Open AppDelegate.


1 Answers

There are no logical limitation on Core Data itself beyond those imposed by situational memory, disk space etc. However, if you use an SQLite store, you get the default limitations of SQLite itself. If you are writing for iOS, you will never hit those limits.

Really the only practical limitation you hit with Core Data comes from memory issues caused by reading in large blobs e.g. trying to store images or audio in an SQLite store. That can be avoided by storing the blobs in external files.

As an aside, I would warn you that I can tell by the way you phrased the question, that you are thinking about Core Data wrong.

Core Data is not an object wrapper for SQL. Core Data is not SQL. Entities are not tables. Objects are not rows. Columns are not attributes. Core Data is an object graph management system that may or may not persist the object graph and may or may not use SQL far behind the scenes to do so. Trying to think of Core Data in SQL terms will cause you to completely misunderstand Core Data and result in much grief and wasted time.

like image 153
TechZen Avatar answered Sep 30 '22 20:09

TechZen