Re: Inheritance...
Re: Inheritance...
- Subject: Re: Inheritance...
- From: Chuck Hill <email@hidden>
- Date: Wed, 7 May 2008 13:27:28 -0700
On May 7, 2008, at 1:14 PM, Robert Walker wrote:
Agreed,
The only time vertical inheritance makes sense if when you always
fetch against leaf nodes of the inheritance tree and only if the
inheritance tree is very shallow. Take that to mean one level deep
of inheritance with an abstract root entity that you never fetch
against.
Anything more complex than that I would recommend single-table.
My 2 cents.
Vertical or horizontal? With vertical this will still select on the
root, won't it?
Chuck
On May 7, 2008, at 3:54 PM, Chuck Hill wrote:
On May 7, 2008, at 12:48 PM, Florijan Stamenkovic wrote:
Hi all,
In the "[slightly OT] data modeling question" there is some talk
of drawbacks of inheritance, specifically of vertical
inheritance... Since I am currently contemplating implementing a
reasonably complex system, and have thought of using vertical
inheritance, this has got me worried. So, what's the deal???
My situation: a structure of over 10 entities (15ish), inheritance
up to 4 levels in depth. The amount of records per entity will be
quite small (ranging from 5 - maybe 30), so I do not worry about
performance. Many operations will be defined on the topmost
entity. Relationships will almost always relate to the topmost
entity, which will be abstract. I might want to define additional
subentities in the future. Subentities will have a sufficient
amount of their own properties to discourage me from single table
inheritance. Horizontal might do, I do not think I will be
changing the existing structure once made.
I've never done inheritance till now. Am I going to commit suicide
over this?
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.
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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
Robert Walker
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
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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