On Tue, Sep 23, 2008 at 8:44 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > This appears to be a proposal to re-implement triggers inside Django.
I suppose it is. But then, perhaps triggers were a re-implementation of application-based denormalization. ... The chicken? The egg? The world may never know. :) > I can see there are benefits if the underlying DB platform won't support > triggers, but wouldn't triggers be the preferred solution when they're > available? That way there is no chance that changes can be made outside > the scope of the denormalization, and hence no need to recompute the > denormalized values. Perhaps the biggest downside is that distributed applications can't make use of it, since triggers aren't cross-platform. Sure, you could argue that denormalization is best suited for individual projects, rather than distributed apps, but I could see uses for it. Imagine a full-blown forum app that wants to denormalize its post counts. Without some Python-based approach, all I could see is maybe adding a cross-platform "create trigger" API (ugh) to Django, which an application could then use to set up its triggers during syncdb. Otherwise, something like that forum app would have to implement a trigger for all available backends or just ship with instructions on how to set it up yourself. That said, you're right, I would think it's usually safest to put that stuff directly in the db. That way, if you have other applications using other languages or perhaps just other ORMs, everything's all intact. I'm pretty sure I've seen arguments on both sides of the issue, though, so I'm not sure there's any objective answer to it. -Gul --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---