Re: Proper relational database?

From: Raymond Brinzer <ray(dot)brinzer(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Proper relational database?
Date: 2016-04-23 03:13:13
Message-ID: CANasJH=Jx=85LhnfMOW7Ug4=TDRWJJWD9EqMqNs88sGAmy_k8A@mail.gmail.com
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).

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message david 2016-04-23 04:12:34 Re: Proper relational database?
Previous Message John R Pierce 2016-04-23 02:45:37 Re: Proper relational database?