From: Edmund L. <el...@in...> - 2003-06-09 06:22:05
|
Luke Opperman wrote: > Care to elaborate on the design reasons for sticking these both > in one table instead of two? Sorry to take so long to get back to you... I had been rummaging around looking for an example from a rather wierd organization relationship situation I came across a few months back at a government organization. After looking at it, I don't think it applies here. However, I suppose the biggest reason for wanting to keep more than one related join in a table is to allow for easy querying. By keeping all the related join mappings in a single table, it is easier to make queries on the relationships themselves. E.g., find all relationships where a Person has a simultaneous relationship with (Cat and Dog and Bird). This is mostly useful when the relationship or characteristics of the relationship are important. If each pairwise relationship was scattered across separate mapping tables, it becomes a bit more cumbersome to make queries on relationships. What's more if some attributes only apply when certain combinations of relationships are true, then maybe it make sense to store them with the mapping table. Or, maybe the data model really needs to be rewritten... But anyway, it is nice to have the option of using perverted data model. :-) ...Edmund. |