Re: Whither 1:1? - Mailing list pgsql-general

From Guyren Howe
Subject Re: Whither 1:1?
Date
Msg-id 50F10257-313A-4DE7-A6B3-E4A35A009787@gmail.com
Whole thread Raw
In response to Re: Whither 1:1?  (James Keener <jim@jimkeener.com>)
List 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 by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Whither 1:1?
Next
From: John Woltman
Date:
Subject: RPM Packaging Question - Fedora 28 & Postgis