views:

334

answers:

1

Why does Apples Core Data iPhone Recipes Example use a separate entity for called Image linked to the Recipe Entity via a one to one Relationship to store the recipes image. Why not just have an "image" attribute in the Recipe Entity?

Many Thanks

+6  A: 

They could. But it's an efficiency thing. If image is a large blob, then to save on excessively slow fetches from Recipe, it's simplest to create a separate table for each blob property.

Paul Lynch
Makes sense, just a form of lazy loading I guess. Thanks Paul.
Daniel Granger