Re: Proper relational database?

Поиск
Список
Период
Сортировка
От Raymond Brinzer
Тема Re: Proper relational database?
Дата
Msg-id CANasJH=Jx=85LhnfMOW7Ug4=TDRWJJWD9EqMqNs88sGAmy_k8A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proper relational database?  (John R Pierce <pierce@hogranch.com>)
Ответы Re: Proper relational database?  (<david@andl.org>)
Список 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 по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Proper relational database?
Следующее
От:
Дата:
Сообщение: Re: Proper relational database?