Modeling a Unary relationship

Hi all, I’m currently evaluating this product. I have not really used an ER software tool before and usually diagram things out by hand. Anyways, I have a case where I am modeling a dictionary database. So one of the tables is Terms, another is Definitions, etc. My question is, how would I model a table called SeeAlso in Visual Paradigm. For example the term “car” in the Terms table could refer to “automobile” or “vehicle” also in the terms table.

Hello Grantarchy,

Please see the attached image. Is this what you needed?

Best regards,
Jick

I don’t see any attachment …

Oops, my mistake…

er-model.png

Hi Jick, thanks for the diagram but that’s a binary relationship between 2 entities. I am wondering how people model a unary relationship in a CASE tool where the entity relates to itself. For example a person is married to another person. Or an employee can manage another employee, etc. Or in my example, a dictionary term can be a synonym of another dictionary term.

Hi Grantarchy,

How about this?

Best regards,
Jick

unary.png

Hi Grant
I thought about the examples you gave; maybe the point is that they should NOT have a relationship with respect to each other, ie instantiations of the same object intentionally should know nothing about each other.

Take husband and wife; while both (usually) humans, they are NOT (usually) related except they each have a relationship to a third object, Marriage (a subclass of Institution).

That works OK. So what about your Synonyms? One word does not usually know about its synonyms. That information is semantic and usually in a list organised as a Dictionary or Thesaurus or Lexicon etc.
Of course if your app is deeply interested in synonyms you could create such a beast, call it a ‘multiword’. Each Multiword knows all its synomyms (including the one by which it is currently labelled).

Note that synonyms do not know about each other, probably they just know which ‘multiword(s)’ they belong to. Note that ‘(s)’; because this approach allows synonym sets to overlap (in the Venn sense) which may well be necessary.

Does that cut it for you?

One apparent exception is their physical relatioship. To keep this clean, lets change to playing-cards. It is desirable to be unable to know what is on one card by examining another card.
The institutional relationship between playing cards is their Deck ‘container’; which can contain a 1D, 2D or 3D list defining the cards’ physical locations.
A card should perhaps be able to find out which cards it is physically pressed between. Why shouldn’t it refer to its ‘sensations’ of the external physicality of the Deck environment. A Deck is always a Deck, dealt or not, and if it ‘knows’ where its cards are, a card could ask the Deck which other cards it is stacked between.
(Of course, card players know that if you refer to what every Deck knows about its cards you can infer what the ‘next’ card might be, but that won’t tell you much about another Deck’s cards.)

But you are right, it is reasonable in some cases for objects to ‘speak’ among themselves, but maybe what this discussion is trying to tell me is that communication bewteen peers is always via a third component, be it language, a network or a piece of wire.

Unless they are Borgs…but I digress…

Best regards
SimonA