Re: Proper relational database? - Mailing list pgsql-general

From Raymond Brinzer
Subject Re: Proper relational database?
Date
Msg-id CANasJH=Jx=85LhnfMOW7Ug4=TDRWJJWD9EqMqNs88sGAmy_k8A@mail.gmail.com
Whole thread Raw
In response to Re: Proper relational database?  (John R Pierce <pierce@hogranch.com>)
Responses Re: Proper relational database?
List pgsql-general
On Fri, Apr 22, 2016 at 10:45 PM, John R Pierce <pierce@hogranch.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).

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.

--
Ray Brinzer


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Proper relational database?
Next
From:
Date:
Subject: Re: Proper relational database?