Subject: Row vs. tuple

From: Peter Eisentraut <[email-masked]>
Date: Sat, 15 Mar 2003 01:37:10 +0100 (CET)

In some places the documentation uses the term "tuple" to mean "row
version" (in the MVCC sense).  This choice of terms is puzzling me; where
does it come from?  In the literature available to me, the term "tuple" is
used as the mathematical equivalent of "row", meaning that
table/row/column parallels relation/tuple/attribute.  This terminology is
also used in other parts of PostgreSQL.  For example, libpq and derived
interfaces use "tuple" in function names to refer to rows.  Should we not
make this usage consistent?  I suggest we use "row version" when we mean
row version, which will also make things clearer to less experienced
users.

-- 
Peter Eisentraut   [email-masked]

---

From: Tom Lane <[email-masked]>
Date: Fri, 14 Mar 2003 20:06:33 -0500

Peter Eisentraut <[email-masked]> writes:
> table/row/column parallels relation/tuple/attribute.

Well, "row version" isn't a particularly standard term either.  I'd
prefer a one-word term.  I think that the use of "tuple" for this can be
traced back to the Berkeley code.

I concede that it's not standard usage anyplace else ... but the whole
concept of row versions isn't real standard in most DBs.

(Anyone know what Oracle calls 'em?)

			regards, tom lane

---

From: Sean Chittenden <[email-masked]>
Date: Sat, 15 Mar 2003 13:03:21 -0800

> > In some places the documentation uses the term "tuple" to mean
> > "row version" (in the MVCC sense).  This choice of terms is
> > puzzling me; where does it come from?  In the literature available
> > to me, the term "tuple" is used as the mathematical equivalent of
> > "row", meaning that table/row/column parallels
> > relation/tuple/attribute.
> 

How about:  s/(row|tuple)/record/

A "record" is a much less theoretical/mathematical term that I've had
good success in using when describing basic table theory to lay
people.  Seems easier to grasp on the uptake than a row (rows are
confused with columns if you're not familiar with databases, math, or
matrices.  "Do rows go vertically or horizontally?") or tuple
(heavily mathematical term or term used in DB theory, but no where
else).  A record, on the other hand, is something that everyone has a
conceptual picture of.  -sc

-- 
Sean Chittenden

---

From: Tom Lane <[email-masked]>
Date: Sat, 15 Mar 2003 16:31:22 -0500

> How about:  s/(row|tuple)/record/

We do need two different terms: eliminating the distinction between a
row and a version of a row is not going to improve matters.

I have nothing against the word "record", but it doesn't seem to help
clarify this distinction ...

			regards, tom lane

---

From: Sean Chittenden <[email-masked]>
Date: Sat, 15 Mar 2003 20:35:28 -0800

> We do need two different terms: eliminating the distinction between
> a row and a version of a row is not going to improve matters.
> 
> I have nothing against the word "record", but it doesn't seem to
> help clarify this distinction ...

Well, if you want to get cognitive, "old record" likely carries a more
explicit and easy to understand mental picture than "old tuple" or
"version of a row."  I guess the same phrasing could apply to tuple or
row, but record has historically seemed like the easiest term for
people to grasp.

  (new|old)? (record|row|tuple)

It's not a one word zinger, but (new|old)? is just a description for
the entity that the mind has an understanding or conceptupal picture
of.  -sc

-- 
Sean Chittenden

---

From: Peter Eisentraut <[email-masked]>
Date: Fri, 21 Mar 2003 11:04:41 +0100 (CET)

Tom Lane writes:

> prefer a one-word term.

I think "row version" is the only logical and self-explanatory term that
can be derived from "row" and "multiversion concurrency control".  And
even though it's two words, it's just as short as most other terms we
could come up with.  But more importantly, it should get the message
across to most users, while most other suggestions would simply be another
ambiguous word.

> (Anyone know what Oracle calls 'em?)

I don't think Oracle really has this concept, because their
multiversioning is not implemented with a nonoverwriting storage manager.

---

From: Hannu Krosing <[email-masked]>
Date: 25 Mar 2003 23:01:05 +0200

> row and a version of a row is not going to improve matters.

For me "row version" is a nice, self-explaining term. There is very
little chance that you will misake it for anything else, from whatever
culture (math,db,bean-counting,hardware hacking,...) you come from.

Tuple and record are both already loaded with several different and
contradicting meanings.

> clarify this distinction ...

True.

-----------
Hannu