relation type
William Denton
wtd at pobox.com
Thu Nov 2 22:31:56 EST 2006
On 2 November 2006, Knut Hegna wrote:
> I have read the mysql-init.sql file and I wonder if you have
> considered establishing a table of relation types (with
> relation-id in one column) and then to introduce the
> relation-id in the other relation tables
>
> work-work-relation_id,
> work-person-relation_id,
> work-expression-relation_id,
> manifestation-person-relation_id,
> ... and so on
>
> We need to know what kind of relation we're talking about
> and as I see it this can be implemented either as different
> relation tables, one for each relation type, or by
> introducing relation type in the existing tables.
We definitely need to know what kind of relation it is, but I wasn't sure,
when I was sketching this out, how best to handle that, whether to add
another table or use the join table. Other tables, as you list, would
work best, I think. There'd be a lot of standard relations (X is editor
of Y, C is successor to B) that could be referenced, and people should
also be able to define their own if need be (F is an anti-matter copy of
G).
I wasn't sure how best to get all relations working in Rails, either. I
read some blog entries saying many-to-many relationships had gotten easier
to handle in edge Rails, but I didn't want to get into that just yet. Do
you know the best way to do this in Rails?
In my head, I image a nice Ajaxy UI where a user can see that X <---> Y
and can edit the relation line in place, pop up a list of options to
choose from, or add a new one. That gets stored in the database.
Cheers,
Bill
--
William Denton : Toronto, Canada : www.miskatonic.org : www.frbr.org
More information about the openfrbr-devel
mailing list