Note that there are some explanatory texts on larger screens.

plurals
  1. POAbout usage CoreData: relationships or id
    primarykey
    data
    text
    <p>I have a quick question about appropriate usage of framework CoreData. <br/><br/> Introduction: i have an application with a few UITableViewControllers offering different entities. <br/><br/> 1 - list of events - entity "ResponseEventsItem"<br/> &nbsp;&nbsp;&nbsp;&nbsp;every event had interrelated records:<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- spakers (entity "ResponseEventsSpeakersItem") - every record has only one parent - ResponseEventsItem<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- locations (entity "ResponseEventsSpeakersItem") - every record has only one parent - ResponseEventsItem<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- schedule (entity "ResponseEventsSpeakersItem") - every record has only one parent - ResponseEventsItem, and also other related records: ResponseSpeakersItem and/or ResponseLocationsItem<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - sponsors (entity "ResponseEventsSponsorsItem") - every record has only one parent - ResponseEventsItem<br/> 2 - about the town (entity "ResponseCityAboutItem")<br/> 3 - attractions (entity "ResponseSightsItem")<br/> 4 - hotels (entity "ResponseHotelsItem") - can be related to ResponseBonusesItem<br/> 5 - fastfood (entity "ResponseFoodsItem") - can be related to ResponseBonusesItem<br/> 6 - entertainment (entity "ResponseEntertainmentsItem") - can be related to ResponseBonusesItem<br/> 7 - special offers (entity "ResponseBonusesItem") - this record is related to "ResponseEventsItem" and ("ResponseHotelsItem" or "ResponseFoodsItem")<br/> <br/><br/> QUESTION: what is the best way to use framework CoreData? <br/><br/> 1 - create a single storage (store NSPersistentStore) and load up everything into it and establish connections based on relationship of cores (for instance, relationships to-many ResponseEventsItem.locations -> [ResponseLocationsItem] ) <br/><br/> or <br/><br/> 2 - or to create an individual storage of each separate core ( however in this particular case we will not be able to use relationships because relationships exist only within one given storage) and to make sure that selection of interrelated data is done through ID, like in a regular SQL data base (mysql as an example). <br/><br/> When I am asking what is the best way, I actually mean what is the most efficient and most common way (quickest response time)? is there a chance that the storage will overload in case if all the data will be located in only one storage?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload