Note that there are some explanatory texts on larger screens.

plurals
  1. POCore Data or NSDictionary with multiple date entries (about 800+ each year)? What would be the most easy to implement?
    primarykey
    data
    text
    <p>I'm trying to figure the best approach to solve this problem. </p> <p>--</p> <p>I have a "<strong>History</strong>" table that, lists <strong>ALL years</strong> that have data.</p> <p>If a user clicks a given Year, it segues to a new Table and, lists <strong>ALL months</strong> that have data. </p> <p>Clicking a given month, shows a new table that, lists <strong>ALL days</strong> that have data.</p> <p>Clicking a specific day, shows a list of one or multiple Time Stamps.</p> <p>--</p> <p>What is the best approach to solve this?</p> <p>If user creates a Time Stamp. I need to insert it with today's date.</p> <p>I also need to have the ability that if a user, Deletes a given year. Everything in that year is deleted. </p> <p>That same way, Deleting a month, deletes everything in that month, for it's particular year.</p> <p>And so on, to the point where the user should be able to delete Individual Time Stamps.</p> <p>--</p> <p>I thought I would Use a <strong>Dictionary</strong> with key for the "year". 2012, 2013, ...</p> <p>And each retrieving another Dictionary with key for the "month", 1, 2, 3, 4, ...</p> <p>And so on ... and so on ...</p> <p>I also thought I could make a model using Core Data.</p> <p>A Class Year representing the "<strong>Year</strong>" entity, having a relation to many possible <strong>Months</strong>, and each month, having a relation to many possible <strong>days</strong>, and days to <strong>Time</strong> *<em>Stamps</em>*.</p> <p>And last,</p> <p>I thought of creating a model with only two Entities.</p> <p><strong>Entries</strong>, with only one attribute "<strong>Date</strong>", that has a <strong>to-many relationship</strong> to "<strong>Time Stamps</strong>", receiving All the possible Time Stamps for that given day.</p> <p>I am new to iOS programming. So this is all theory for me. But I did follow some Core Data tutorials and others working with NSDictionaries, protocols delegates and so on.</p> <p>The "Dig In" approach as I go trough, seems more elegant. Specially because I think I could delete a particular given object in a cascade manner?</p> <p>Do any of these make sense? Or is there a more obvious easy way to go about it? Also, please consider in the answer <strong>what would be easier to implement</strong> if a user chooses to delete a given entry in the "tree"</p> <p>Any help is most appreciated.</p> <p>Thank you advance!</p> <p>Nuno</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.
 

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