On 8/8/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Tue, 2006-08-08 at 07:35 +0800, Russell Keith-Magee wrote: > [...] > > > > For those late to the discussion, it should be noted that this was one > > of the ideas proposed for implementing inheritance. It was rejected on > > two grounds: > > > > 1) Lack of support for legacy databases > > 2) The number of joins that would be required for queries in the > > general case. > > More for the first reason than the second, I thought. > > The join numbers are as small as possible when you have a discriminator > (because you can work out precisely the right tables to join); it's one > of their advantages. As soon as we threw out discriminators, true > transparent polymorphism (duck typing) became harder because the join > numbers now became O(# of nodes in the inheritance tree).
Even with discriminators the queries would be very wide. When querying to retrieve a bunch of objects, you don't know which tables to join until after you've selected the discriminator value, so you have to outer join them all anyway. I didn't say so yet, but I think the proposal you outlined is a sensible compromise between functionality and implementation complexity. Cheers, Alan. > > Regards, > Malcolm > > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---
