[Zope-dev] Re: RFC: RelationAware class for relations betweenobjects

Shane Hathaway shane@ZOPE.COM
Wed, 30 Apr 2003 22:35:01 -0400 (EDT)


On Wed, 30 Apr 2003, Evan Simpson wrote:

> Shane Hathaway wrote:
> > Steve Alexander wrote:
> >> What about making relationships among pre-existing objects that were 
> >> not designed with relationships in mind?
> > 
> > As it stands, Jobs have no relationships with Users, but now you want to 
> > relate Jobs to Users.
> 
> I'd say that this could be a fairly common use case.  Here's my take on 
> what Relationships should be, using ERM jargon (see:
> http://www.cs.jcu.edu.au/ftp/web/teaching/Subjects/cp1500/1998/Lecture_Notes/er_model/rships.html)
> 
> A relation is a mapping from roles to entities.  These entities don't 
> need to know anything about the relation in order to be a part of it. 
> The relation may also have descriptive data attached to it.
> 
> A Relationship is an object that contains a set of relations of the same 
> type, meaning that each relation is based on the same set of roles.
> It provides methods for searching and modifying this set. The 
> Relationship also imposes constraints on and among the relations that it 
> contains.

Well, Evan, I'm having a hard time interpreting the paper you referenced
that way.  The paper seems to use "relation" and "relationship"  
interchangeably.  What it describes are relationships and relationship
sets.  A relationship set is a set of relationships of the same type.

I just found a more thorough description of the Entity Relationship Model.

http://www.cs.sfu.ca/CC/354/zaiane/material/notes/Chapter2/node1.html

This one seems to use only the terms "relationship" and "relationship
set".  In fact, the next chapter of the course introduces relations and
the relational algebra, which are clearly distinct concepts from ERM.  The 
class notes come from the book _Database_System_Concepts_:

http://db-book.com

I'll ponder the rest of your email once we've agreed on common 
definitions.

Shane