• 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: Inheritance...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inheritance...


  • Subject: Re: Inheritance...
  • From: Ken Anderson <email@hidden>
  • Date: Thu, 8 May 2008 10:04:02 -0400

If you're only going to fetch on the leaf entities, I would favor horizontal just from an organizational point of view. Remember though, if you have relationships to the root entity (like the inverse of a to-many relationship that all subentities have), you're still going to have extra fetches when the fault fires.


On May 7, 2008, at 10:24 PM, Florijan Stamenkovic wrote:

Thanks everyone from preventing me to learn the hard way... Apparently my choices are single-table or horizontal.

A question: assuming I intend to perform individual fetches for each entity anyway, that there will be no direct fetching on the root entity, and that there will be maybe 100 records in the total hierarchy, is there something else against using horizontal? It seems that, considering these things, it might be profitable to keep the db clean, even though at the moment only EOF will deal with it... I mean, for 100ish records in total, how bad can performance get???

30+ columns in a table just hurts me in the stomach area :) Though, I guess I could, arghhh, get over it...

Flor

On May 07, 2008, at 16:08, Mike Schrag wrote:



You might want to check for suicide exclusions in your life insurance policy. :-) David Avendasora was using Vertical with JC. He stopped. Maybe he can provide some pointers. My advice would be to ignore that "Subentities will have a sufficient amount of their own properties" and use Single Table. Or, failing that, Horizontal. Vertical is the least efficient and the least used hence has a higher probability of bugs.


I would recommend AGAINST horizontal here -- You have 10 entities in your hierarchy, which means 10 fetches every time you need to fault an object of the root entity. I second Chuck on using single table. Yes, your database is uglier, and you lose some of the benefits of database not-null constraints, but this is really more of an issue if other apps are using your database. For us, it's almost never the case .. our WO apps get exclusive access to the dbs generally, so as Chuck as said, the database is an implementation detail. I let EOF worry about the fact that it has a lot of columns.

There ARE people using vertical, but I only know of a handful.

ms

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

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

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Inheritance...
      • From: Florijan Stamenkovic <email@hidden>
References: 
 >Inheritance... (From: Florijan Stamenkovic <email@hidden>)
 >Re: Inheritance... (From: Chuck Hill <email@hidden>)
 >Re: Inheritance... (From: Mike Schrag <email@hidden>)
 >Re: Inheritance... (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: Re: Address System using QAS
  • Next by Date: Re: NSSelector<T> - a curiosity
  • Previous by thread: Re: Inheritance...
  • Next by thread: Re: Inheritance...
  • Index(es):
    • Date
    • Thread