Re: Core Data - SQLite persistent store file size optimization
Re: Core Data - SQLite persistent store file size optimization
- Subject: Re: Core Data - SQLite persistent store file size optimization
- From: Chris Hanson <email@hidden>
- Date: Sun, 1 Apr 2007 04:26:06 -0700
On Mar 31, 2007, at 3:28 PM, Guy Meyer wrote:
Consider a core data entity including a 128 bit attribute with few
possible values. Instead of including it in each managed object as
an attribute it can be set as a relationship pointing to a separate
entity which will store only a single copy of it.
When dealing with SQLite persistent store which of the above options
is more efficient as far as file size is considered ? a relationship
(i.e. pointer to another recored) or an attribute ? What is
equilibrium size ?
Let your data model guide guide you, and normalize it as much as
possible at first. Since normalization is ultimately about removing
duplication of data, your intuition that you should use a separate
entity is correct.
You should avoid making these decisions purely on some technical basis
like "equilibrium size" if at all possible; even if it was only 1 byte
rather than 16, it might still make more sense in the context of your
data model -- that is, based on its meaning -- to model it via a
relationship.
-- Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden