Re: Fwd: partial "on-delete set null" constraint

Поиск
Список
Период
Сортировка
От rob stone
Тема Re: Fwd: partial "on-delete set null" constraint
Дата
Msg-id 1422197258.2127.3.camel@gmail.com
обсуждение исходный текст
Ответ на Fwd: partial "on-delete set null" constraint  (Alban Hertroys <haramrae@gmail.com>)
Ответы Re: partial "on-delete set null" constraint  (Alban Hertroys <haramrae@gmail.com>)
Список pgsql-general


On Sun, 2015-01-25 at 14:09 +0100, Alban Hertroys wrote:
> >> The theory got me intrigued. google (http://en.wikipedia.org/wiki/Codd%27s_12_rules) says:
> >> rule 3: "systematic treatment of null values"; hmmm.... this is a little broader then "support for null". I would
think,that: 
> >> 1. if a sequence of "update XX set fk_field=null; then delete YY depending on that FK", for a particular schema
definitionworks ... 
> >> 2. so the implementation of FK should support that too ... to be called "systematic", right?
> >> 3. and the simplest way to do that for the case at hand, within an "on delete action", is to skip those parts of
FK,that are marked as "not null" within the referring table. That would be a "requirement" for rdbms implementation
thatclaims compliance with Codd rule nr.3 :) 
> >
> > I translated Codd-relationality to English, possibly it’s named differently.
> >
> > Oddly enough, I can’t find any reference to Codd being responsible for this rule anywhere on the internet. What I
didfind is that the theory I referred to stems from 1970(!), but that’s the closest I got. 
>
> My teachers got back to me; a while ago already, to be fair. They were as surprised that this can't be found on the
internetas I was, but it should be possible to find it in printed form. I'd suggest a university library or a good
technicalbook store. 
>
> Apparently, this particular theory is explained in E.F. Codd: "The relational model for database management". There
areprobably other books that do too. 
>
> Unfortunately, I do not own a copy so I can't verify. If anyone who does own a copy could confirm or even quote the
relevantsection, that would be great. Better yet, perhaps this should find it's way (back) to the internet? I'm still
muchsurprised that Wikipedia didn't have this. 
>
> Oh, and perhaps we could get a reference in the PG docs on primary keys and NULLs to the theory? Do we have such
thingsin the docs? It sounds like a good idea to me, I always find it helpful to know why things are how they are. But
Idon't write the docs so this is just one for the ideas-box. 
>
> Cheers,
>
> Alban Hertroys
> --
> If you can't see the forest for the trees,
> cut the trees and you'll find there is no forest.
>
>
>


The following link

http://www.databaseanswers.org/codds_rules.htm

sets out Ted Codd's rules according to C.J. Date.

I don't have a copy of the book so I can't verify the accuracy of what
is published at this link.





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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Fwd: partial "on-delete set null" constraint
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: partial "on-delete set null" constraint