[Zope-DB] Data modelling question

Charlie Clark charlie at begeistert.org
Sun Sep 21 16:36:37 EDT 2003

Dear list,

I have the following problem - a glossary of terms where some but not all 
terms are synomous.

My relational model is currently: id, term, description because definitions 
were exclusive but who says things have to stay like that? Customers don't 
understand relation models and the CONSTRAINTS they impose ;-)

Possible solutions:
1) allow two synonymous terms to have two distinct but identical definitions
2) allow a reference from one term to another "see XYZ..."
3) allow both synonmyms to refer to the same definition.

Here are my initial thoughts:
1) Can be done without programming. Rejected because it violates redundancy 
and might cause nasty problems later even merely as a precedent
2) Avoids redundancy but breaks data / programming separation layers as the 
description field has to be checked to see if it contains a link. 
Administration would be fairly easy.
3) How this 1 -> 1 / m -> 1 modelled? New table simply for descriptions 
with a reference to a description's id from the term's table? or an 
intersect table mapping n terms to n descriptions? Programming 
administration is tricky.

My current inclination is to go with 3) as it keeps to model clean so stops 
the slide down the slippery slope. But as this cannot be a unique problem 
I'd appreciate opinions and suggestions.



More information about the Zope-DB mailing list