Saturday, May 12, 2012

iOS Core Data Basics

iOS Core Data
 #Best to use for non-trivial data storage.
 #Lot of boilerplate code to help us is available.
 #Reduces memory overhead of application.
 #Default backing stores in SQLite. More can be found here
Three most important aspect of Core Data stack.
Persistance Store Coordinator : This is place where you set up actual names and locations of database. It is like database connection.
Managed Object Context "Scratch Pad" for database objects. This is most important as here we do all insertion, deletion and get objects. You may have more than one managed object context in your application. For every object in a persistent store there may be at most one corresponding managed object associated with a given context.
Managed Object Model : It is a schema that gives description of entities (or managed objects). You create it typically graphically using Xcode's Data Model design tool. More to come soon..