I think that the relationships in my model are OK so far. In my concrete
case, an instance of A would be a so-called (domain-specific) user
dictionaries. An instance of B would be a dictionary entry (each
dictionary has many entries). A C would be a so called idiom
description, i.e. explaining the associated B object in different ways.
Hence, each entry would contain several idioms.
The idiom description has among their columns are two fields which are
called "representation" and "kind". In theory, the catenated key of
"representation" and "kind" must be unique within a dictionary
(different dictionaries may have the same [representation,kind] pair
though). For the discussion of this posting, I didn't mention the
presence of the "kind" column, since it just complicates the fact, and
is not really important here for various reasons.
I could add to C a foreign key to A, and then express my validation with
the help of this key, but it seems to me pointless to introduce a new
column only for this purpose.
I am aware that I could do a custom validation, but I thought that the
case my case is commonplace, that Rails maybe has some built-in feature
for this which I just am not aware of.