• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: One Solution for storing ordered arrays within Core Data objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One Solution for storing ordered arrays within Core Data objects


  • Subject: Re: One Solution for storing ordered arrays within Core Data objects
  • From: "Fletcher T. Penney" <email@hidden>
  • Date: Tue, 14 Jun 2005 19:36:38 -0400


Fletcher:

   Kudos for the novel approach, but I wonder if this might cause
performance problems in other situations. Adding an extra property
called "sortOrder" or whatever you like as a number will give you
sorting for free, using Bindings. Drag and drop (or some other user
action) would cause all the objects to be renumbered.

   Can anybody (who knows better than I do) state with authority
which would be the better performer?



Valid point, but I had envisioned this for use in a setting like the one I
described, where there might be 5-10 strings in an ordered array, and
converting a single string to 5-10 substrings shouldn't be that big of a
performance hit (I would think). Though any performance hit could be big
if multiplied over 10,000 items in a database. I could be wrong, and
would appreciate input from others.


Another factor to consider is speed of searching. With this approach, you
can use:


    authorString contains[c] "query"

to match objects where any author matches the query, rather than having to
search each paper for its authors, and then match each author
individually. Not sure which search would be faster.


I certainly imagine this approach would not work well with large numbers
of ordered strings, but again, that is not the context for which I
intended it.


Thanks for the feedback, and I welcome more - I am not a database or Core
Data expert. I just simply thought this idea neatly solved a particular
problem that I had.



Thanks!

Fletcher



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Typo In NSPersistentDocument Core Data Tutorial?
  • Next by Date: Re: xcode-->java-->cocoa - how long? how many?
  • Previous by thread: Re: One Solution for storing ordered arrays within Core Data objects
  • Next by thread: Tracked down the over-release bug
  • Index(es):
    • Date
    • Thread