[Grok-dev] Implementing an N-to-N relationship

Luciano Ramalho luciano at ramalho.org
Mon May 28 11:51:28 EDT 2007


Kirbi entities include Books and Creators [1].

[1] http://circulante.incubadora.fapesp.br/portal/about/Entities

For example, "The Annotated Alice" is an instance of Book, ISBN-13
978-0393048476.

Lewis Carroll, John Tenniel and Martin Gardner are instances of Creator.

In the case of "The Annotated Alice", Lewis Carroll is the author,
Martin Garnder is the editor, and John Tenniel is the illustrator.
Martin Gardner is also the author of "Fads and Fallacies in the Name
of Science".

So this is an example of an N-to-N relationship with an annotation
which defines the role  of the creator (just as string like "author",
"illustratior" etc.)

Should I have a CreatorRole class, or is there a more lightweight way
of doing this with Grok?

Cheers,

Luciano


More information about the Grok-dev mailing list