Subject OT? Re: [firebird-support] (term 'relation')
Author Kjell Rilbe
Is this off topic?

The purpose of this message is to try to find an intuitive reasoning
behind the term "relation", without using complicated math terms.

unordained wrote:
> 'Relation' is a term borrowed from mathematics. A relation is a set of points (tuples) in N-space.
> Each point has N attributes, each one containing a value from a given domain. A relation is a
> subset of all such possible points, which you can get through a cartesian product (thus a cartesian
> space is the set of all possible points in the given dimensions.)
>
> http://en.wikipedia.org/wiki/Relation_(mathematics)

OK, read the Wiki page about relations (which is new to me) and the one
about cartesian products as well, just to refresh my memory.

I now understand that "relation" comes from the fact that it's
considered to be a generalization of the common binary relations we use
most every day, e.g. "=", "<".

So, a relation is basically a set of n-tuples which fulfil some kind of
condition. In the general case, this condition is "the n-tuple exists in
the set of allowed n-tuples I have listed over here", which is called
G(R) in the Wiki article.

But the condition would probably in most cases be expressed more like
this: "the set of 3-tuples where the first value is the name of a
person, the second value is the street address where that person lives,
and the third value is that person's home telephone number".

It's called a relation because it describes (contains?) a relation
between names, street addresses and phone numbers.

So, to understand the term "relation" you should probably think of your
"tables" as containing tuples of values that belong together, or in
other words, are related to each other.3//

Going back to a common binary relation: "= for real numbers". This would
be a table with two columns, both typed as real numbers, where each
record contains the same real number in both columns.

OK. That good enough for me. Now I can sleep well at night again. :-)

> There. Pedantic enough?

Very interesting and many thanks for taking the time to write it all down.

Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64