Re: Nulls get converted to 0 problem

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: Nulls get converted to 0 problem
Дата
Msg-id 3EE0D098.5010300@mascari.com
обсуждение исходный текст
Ответ на Re: Nulls get converted to 0 problem  (Jon Earle <je_pgsql@kronos.honk.org>)
Ответы Re: Nulls get converted to 0 problem  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Jon Earle wrote:
> On Fri, 6 Jun 2003, Mattias Kregert wrote:
>
>
>>1. Imagine a table with dates and weather conditions. How would you
>>   differ between "zero degrees" and "no data entered yet"? You would
>>   have to add a column (degrees_valid boolean). Having the NULL value
>>   makes things much easier.
>
> <click!>
>
> Thank you Mattias, the differences (and similarities) are now clear.

Some people think NULLs have no business in databases:

http://www.hughdarwen.freeola.com/TheThirdManifesto.web/Missing-info-without-nulls.pdf

And that they cause unforeseen logical problems:

http://www.firstsql.com/iexist2.htm

There also isn't any notion of typed NULLs. At least the C++ example
has a zero-initialized pointer to a type.

The meaning is overloaded. Does NULL mean:

"I don't know" or
"I can't know" or
"Not applicable"  <- This usually implies a non-normalized database

They also require a full implementation of RI (MATCH PARTIAL) if the
attributes are involved in PK/FK relationships.

They cause problems in representations when moving data into and out
of the database between non-SQL systems, as evidenced by this thread.

I'm not sure of the current state, but in older versions of
PostgreSQL, NULLs weren't indexable.

I'd avoid them. But that's just my humble opinion...

Mike Mascari
mascarm@mascari.com


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

Предыдущее
От: Jamie Lawrence
Дата:
Сообщение: Re: Postmaster only takes 4-5% CPU
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Estimate of when CVS will be available again?