ios - Core Data: Relationships and User Objects -


i'm using stackmob coredata (remote database), think general core data question.

i have 3 entities:

  1. user (login)
  2. cars
  3. bikes

each entity has several attributes.

a user can have multiple cars , bikes objects (to-many relationship). cars , bikes can have 1 owner (user) (inverse to-one relationship).

now lets have 2,000 users. each user car dealer , has 500 cars , 300 bikes records/objects stored in coredata. user fetch based on attributes of cars , bikes. plan use predicates this. cut on constant fetch request, plan use cache.

however, questions have are:

  1. how should save record/object under each user? there term in coredata?

  2. i user login , able fetch cars/bikes based on attributes (model, manufacture, datestamp, etc.) within objects user created. guess i'm trying avoid when user fetch request based on attributes in cars , bikes entity, searches under own user objects. don't want fetch request search through others user's objects because waste i'm afraid that'll slow down app. what's best way set in coredata?

just went though 2 core data books , i'm not sure how approach this. know i'm not brightest turn experts advice. thank you.

coredata excelently optimized. need nssearchpredicate , and nsfetchedresultscontroller. these both kind of complicated , can't "tell" how use them. found open course extremely helpful

http://www.stanford.edu/class/cs193p/cgi-bin/drupal/

it builds website fetching app in ios using core data. check core data episode , if don't know he's talking go , watch earlier ones


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -