Glossary: improve definition of "relation"

Define the more general term first, then the Postgres-specific meaning.

Wording from Tom Lane.

Discussion: https://postgr.es/m/CACJufxEZ48toGH0Em_6vdsT57Y3L8pLF=DZCQ_gCii6=C3MeXw@mail.gmail.com
master
Álvaro Herrera 2 weeks ago
parent 325fc0ab14
commit 16a9165ce4
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
  1. 27
      doc/src/sgml/glossary.sgml

@ -1419,11 +1419,15 @@
<glossterm>Relation</glossterm>
<glossdef>
<para>
The generic term for all objects in a
<glossterm linkend="glossary-database">database</glossterm>
that have a name and a list of
<glossterm linkend="glossary-attribute">attributes</glossterm>
defined in a specific order.
Mathematically, a <firstterm>relation</firstterm> is a set of
<glossterm linkend="glossary-tuple">tuples</glossterm>;
this is the sense meant in the term "relational database".
</para>
<para>
In <productname>PostgreSQL</productname>, "relation" is commonly used to
mean an <glossterm linkend="glossary-sql-object">SQL object</glossterm>
that has a name and a list of attributes defined in a specific order.
<glossterm linkend="glossary-table">Tables</glossterm>,
<glossterm linkend="glossary-sequence">sequences</glossterm>,
<glossterm linkend="glossary-view">views</glossterm>,
@ -1431,15 +1435,14 @@
<glossterm linkend="glossary-materialized-view">materialized views</glossterm>,
composite types, and
<glossterm linkend="glossary-index">indexes</glossterm> are all relations.
A relation in this sense is a container or a descriptor for a set of tuples.
</para>
<para>
More generically, a relation is a set of tuples; for example,
the result of a query is also a relation.
</para>
<para>
In <productname>PostgreSQL</productname>,
<firstterm>Class</firstterm> is an archaic synonym for
<firstterm>relation</firstterm>.
<firstterm>Class</firstterm> is an alternative but archaic term.
The system catalog
<link linkend="catalog-pg-class"><structname>pg_class</structname></link>
holds an entry for each <productname>PostgreSQL</productname> relation.
</para>
</glossdef>
</glossentry>

Loading…
Cancel
Save