Hi Marko,
A relationship that is both functional and inverse functional is a one to one 
relationship, but that is not what I am looking for.
For example the relationship type "FRIEND" is neither functional (I can have 
more than one friend) nor inverse functional (injective) (my friends can have 
more friends than just me), yet I want to limit the number of "FRIEND" 
relationships I have with any specific person to one. The tuple (x, R, y) is 
not necessary unique, this constraint is, for example, violated in the 
MARRIED_TO relationship between Elizabeth Taylor and Richard Burton, whom 
married twice, once in 1964 and a second time in 1975. 
Especially in temporal relationships it is not uncommon to have multiple 
relationships of the same type between the same two nodes. People can get 
married to the same person more than once (although not simultaneously), a 
person can hold the same position in an organization more than once (although 
not simultaneously). 
Of course the distinction between unique relationships and non-unique 
relationships would not be an issue if we could store n-ary relationships in 
Neo4j, such that we could insert the tuple (Richard Burton, MARRIED_TO, 
Elizabeth Taylor, 1964-1974), in which case the relationship type MARRIED_TO 
could be defined to be unique for the triple (person, person, timespan).
Niels
> From: okramma...@gmail.com
> Date: Tue, 12 Jul 2011 13:06:04 -0600
> To: user@lists.neo4j.org
> Subject: Re: [Neo4j] math question
> 
> Hi,
> 
> I suppose I would say that (xRy) is both functional and inverse functional. :)
> 
> Marko.
> 
> http://markorodriguez.com
> 
> On Jul 12, 2011, at 12:36 PM, Niels Hoogeveen wrote:
> 
> > 
> > Thanks Marko,
> > That's not exactly what I am looking for. I'd like to know what the name is 
> > of a relationship where there is only one unique combination of x and y in 
> > xRy for every relationship type R.
> > Neo4j allows the creation of 2^64 relationships of the same type between 
> > the same two nodes. I'd like to define a type where there can be only one 
> > relationship of the same type between the same two nodes (eg. to limit the 
> > number of "FRIEND" relations between two Persons, since it is no use being 
> > friends with the same person multiple times, yet I'd like to allow a Person 
> > to have multiple "WINNER" relationships to a certain game (the count of the 
> > number of relationships indicating how often a person has been the winner 
> > of that game)).
> > Is there any official name for a relationship type where the tuple (x, R, 
> > y) must be unique?
> > Niels
> > 
> >> From: okramma...@gmail.com
> >> Date: Tue, 12 Jul 2011 10:27:04 -0600
> >> To: user@lists.neo4j.org
> >> Subject: Re: [Neo4j] math question
> >> 
> >> Hi,
> >> 
> >> That is called a functional relationship. 
> >> 
> >> A functional relationship states that there is only one unique y in (xRy) 
> >> for every x. 
> >>    - e.g. Social Security Number, Father, BornIn
> >> 
> >> Inverse functional relationships are that there is a unique x in (xRy), 
> >> for every y.
> >> 
> >> See ya,
> >> Marko.
> >> 
> >> http://markorodriguez.com
> >> 
> >> On Jul 12, 2011, at 9:39 AM, Niels Hoogeveen wrote:
> >> 
> >>> 
> >>> Does anyone know the proper mathematical name for a relationship with the 
> >>> following properties:
> >>> For all x in X and y in Y it holds that if xRy and xR'y then R = R'.
> >>> Example:
> >>> There can be only one IS_PARENT relation from one person to another. 
> >>> Someone cannot be twice parent to the same person.
> >>> There can be several IS_PRESIDENT_OF relations from one person to an 
> >>> organization. Someone can be president of an organizations from 1992-1997 
> >>> and again from 2004-2008.
> >>> Niels                                       
> >>> _______________________________________________
> >>> Neo4j mailing list
> >>> User@lists.neo4j.org
> >>> https://lists.neo4j.org/mailman/listinfo/user
> >> 
> >> _______________________________________________
> >> Neo4j mailing list
> >> User@lists.neo4j.org
> >> https://lists.neo4j.org/mailman/listinfo/user
> >                                       
> > _______________________________________________
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> 
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
                                          
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to