Re: Whither 1:1?

Поиск
Список
Период
Сортировка
От Guyren Howe
Тема Re: Whither 1:1?
Дата
Msg-id 50F10257-313A-4DE7-A6B3-E4A35A009787@gmail.com
обсуждение исходный текст
Ответ на Re: Whither 1:1?  (James Keener <jim@jimkeener.com>)
Список pgsql-general
On Jun 1, 2018, at 10:00 , James Keener <jim@jimkeener.com> wrote:

I don't think I fully understand. Do you mean all pk using a single sequence? I’m not sure how this would avoid nulls or grouping fields.

Presumably, you would create the multiple tables together or after some main one or something where you know the PK you’re going to use. Perhaps you create a view with triggers to present them as a single table.

It could avoid nulls by not having rows in some of the 1:1 tables. Say you have a users table with login credentials and also personal information (phone number, email and such). But some of your users are strictly API users so have no personal information. If you split the person information into a separate table, you can just not have rows for those users.

One of the originators of the relational model didn’t want to have null at all, presumably wanting folks to use this pattern instead.

В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Whither 1:1?
Следующее
От: John Woltman
Дата:
Сообщение: RPM Packaging Question - Fedora 28 & Postgis