From: | <david(at)andl(dot)org> |
---|---|
To: | "'PostgreSQL General'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Proper relational database? |
Date: | 2016-04-23 04:12:34 |
Message-ID: | 004901d19d16$5f13a7a0$1d3af6e0$@andl.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> On Fri, Apr 22, 2016 at 10:45 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> > a table with no columns would have no primary key... doesn't that
> > violate one of the fundamental tenets of the relational model ?
>
> Not as I understand it. A relation must have at least one candidate key.
> That will be the set of all the fields, if no proper subset qualifies.
> Calling one key "primary" is merely convention, so far as I am aware (talking
> relational theory, here, not how databases regard primary keys).
This is a 'soft' requirement. If there is no other key, then the set of all attributes is the key.
> In a table with no columns, the only candidate key is the set of all fields,
> which is the empty set. If you want to call that the primary key, it
> shouldn't be a problem. The tuples (all 0 of them) are guaranteed to be
> unique.
The relation with no attributes may have a tuple, which itself has no attributes. Thus there are two such relations, one empty and one of degree one. They can be referred to as DUM and DEE, or as false and true. See http://c2.com/cgi/wiki?TableDum for example.
Many experienced users of SQL are aware of situations where they are useful. In Andl they are automatically available as literals.
Regards
David M Bennett FACS
Andl - A New Database Language - andl.org
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2016-04-23 04:35:07 | Re: Proper relational database? |
Previous Message | Raymond Brinzer | 2016-04-23 03:13:13 | Re: Proper relational database? |