Forum OpenACS Development: Re: group_types: why not referenced in groups

Collapse
Posted by Don Baccus on
I'd vote for the second rather than kludge acs_object_types with a field set null if the type isn't a group type.  Kludges like this are a bit like losing your virginity, there's no going back ... someone will ask for the same kludge for some other type's special case needs and on and on :)

But before denormalizing it's normal to evaluate whether or not doing the denormalization will improve performance considerably.  Will it?  Remember we will need an index on the referencing column in group_type, otherwise deleting object_types will do a sequential scan on group_types when the foreign key check is made so an error or cascade op can be triggered.

So if all this is being used for is to grab the group type's default join policy I'd question if the denormalization would be worth it ...