The Forum for Discussion about The Third Manifesto and Related Matters

Forum breadcrumbs - You are here:
Please or Register to create posts and topics.

Which tuple?

It is notable that the mathematics definition of a tuple is not the same as the (relational) definition of tuple.

I did not used to be bothered by this fact.  I do understand the historical context/reasons.  However it troubles me much more nowadays.

The math definition is quite clear. Wikipedia does a reasonable job.

In mathematics, a tuple is a finite ordered list (sequence) of elements. An n-tuple is a sequence (or ordered list) of n elements, where n is a non-negative integer. There is only one 0-tuple, referred to as the empty tuple. An n-tuple is defined inductively using the construction of an ordered pair.

And (as you all know) TTM has the definition as

a tuple is a set of n ordered triples of the form <Ai,Ti,vi>, where `Ai` is an attribute name, Ti is a type name, and vi is a value of type Ti.

with the important restriction that attribute names are unique within the set.

The Alice book talks about "named" and "unnamed" perspectives to (I guess) reconcile the two definitions (although, to be honest I don't know if their "named perspective" tuple definition is entirely equivalent to the TTM one, but no matter I'm not asking about that)

My question is, how troublesome do others find this?

Would it not be better if a different word was used for the thing that is a relational database tuple?

For example, the TTM definition appeals to the idea of a triple, but that is just a 3-tuple in maths terms. Hence we have the definition of a "db-tuple" as a (restricted) set of "math-3-tuples". That bothers me.

Quote from Paul Vernon on November 10, 2021, 11:36 am

It is notable that the mathematics definition of a tuple is not the same as the (relational) definition of tuple.

I did not used to be bothered by this fact. However it troubles me much more nowadays.

The math definition is quite clear. Wikipedia does a reasonable job.

In mathematics, a tuple is a finite ordered list (sequence) of elements. An n-tuple is a sequence (or ordered list) of n elements, where n is a non-negative integer. There is only one 0-tuple, referred to as the empty tuple. An n-tuple is defined inductively using the construction of an ordered pair.

And (as you all know) TTM has the definition as

a tuple is a set of n ordered triples of the form <Ai,Ti,vi>, where `Ai` is an attribute name, Ti is a type name, and vi is a value of type Ti.

with the important restriction that attribute names are unique within the set.

The Alice book talks about "named" and "unnamed" perspectives to (I guess) reconcile the two definitions (although, to be honest I don't know if their "named perspective" tuple definition is entirely equivalent to the TTM one, but no matter I'm not asking about that)

My question is, how troublesome do others find this?

Would it not be better if a different word was used for the thing that is a relational database tuple? ...

Perhaps a different term might have been chosen in the early days, but the weight of history means we're stuck with it.

I don't find it troublesome as long as the context is clear, and (applied) computer science has co-opted and corrupted mathematical terminology elsewhere -- e.g., common (mis)use of "function" to mean any procedure that returns a value whether it's a true function or not -- so one more doesn't hurt and "tuple" seems particularly minor.

I wonder if such terminology corruption (and also things like a lack of axiomization as per my previous thread) is one reason why the relational model - or TTM at least - is (as far as I understand such things)  rather overlooked by the research community at large?

Quote from Paul Vernon on November 10, 2021, 11:36 am

It is notable that the mathematics definition of a tuple is not the same as the (relational) definition of tuple.

I did not used to be bothered by this fact.  I do understand the historical context/reasons.  However it troubles me much more nowadays.

The math definition is quite clear. Wikipedia does a reasonable job.

In mathematics, a tuple is a finite ordered list (sequence) of elements. An n-tuple is a sequence (or ordered list) of n elements, where n is a non-negative integer. There is only one 0-tuple, referred to as the empty tuple. An n-tuple is defined inductively using the construction of an ordered pair.

And (as you all know) TTM has the definition as

a tuple is a set of n ordered triples of the form <Ai,Ti,vi>, where `Ai` is an attribute name, Ti is a type name, and vi is a value of type Ti.

with the important restriction that attribute names are unique within the set.

The Alice book talks about "named" and "unnamed" perspectives to (I guess) reconcile the two definitions (although, to be honest I don't know if their "named perspective" tuple definition is entirely equivalent to the TTM one, but no matter I'm not asking about that)

The original Codd papers introduced the term tuple and applied it, quite properly I think, to an ordered set of attribute values, each belonging to a particular domain. Seems reasonably consistent with the maths as I see it. This is now known as the unnamed perspective.

At some unspecified point after that there was a general switch to applying a unique name to each attribute value, at which point it is no longer necessary they be ordered. This is the named perspective.

Retaining the name tuple I assume is a matter of convenience rather than mathematical accuracy.

My question is, how troublesome do others find this?

Would it not be better if a different word was used for the thing that is a relational database tuple?

For example, the TTM definition appeals to the idea of a triple, but that is just a 3-tuple in maths terms. Hence we have the definition of a "db-tuple" as a (restricted) set of "math-3-tuples". That bothers me.

What bothers me more is that it isn't really a triple. TTM never really defines a data model. TTM describes a language D and values that belong to a programming language type, and then implicitly imposes that on an RM-like data model. Tuples in the (named) relational model are pairs: name and value. A value necessarily brings a type (or domain) along with it but the type is a property of the value (in the same way that length would be a property of the attribute name).

Andl - A New Database Language - andl.org
Quote from Paul Vernon on November 10, 2021, 12:18 pm

I wonder if such terminology corruption (and also things like a lack of axiomization as per my previous thread) is one reason why the relational model - or TTM at least - is (as far as I understand such things)  rather overlooked by the research community at large?

Though occasional relational model papers still pop up, the database research community largely concluded a while ago that the relational model is a done deal, and the applied implementation thereof should either look like, or be, Datalog.

Then, following fashion -- and, most importantly, associated research funding -- it moved on to other things.

The research community has no problem with using, defining, redefining, and/or corrupting terminology as it sees fit.