Search Postgresql Archives

Re: Whither 1:1?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 1, 2018, at 10:00 , James Keener <jim@xxxxxxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux