mercredi 24 décembre 2014

Core Data with multiple similar entities or single large entity

I want to store the text of 5-10 books using Core Data. Given each book can be quite long (think 30,000 lines), would I be better off:



  1. Creating one Entity to contain all books with different book titles (ie. NSString attributes for bookTitle, lineNumber, lineText, etc) or,

  2. Multiple Entities, one for each book (with the same attributes, ie. lineNumber, lineText)?


Seems like option 2 is cleaner, but just not sure if it'd be wise having multiple Entities, identical in schema, just with differing names (logically makes sense given books have different names)


Aucun commentaire:

Enregistrer un commentaire