Re: NULL values or not?

From: "Aasmund Midttun Godal" <postgresql(at)envisity(dot)com>
To: archie(at)netg(dot)se
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: NULL values or not?
Date: 2001-12-21 15:24:55
Message-ID: 20011221152455.4672.qmail@213-145-170-138.dd.nextgentel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

What is the problem with nulls? why are they bad??

Regards,

Aasmund.

On Fri, 21 Dec 2001 16:08:07 +0100 (CET), Archibald Zimonyi <archie(at)netg(dot)se> wrote:
>
> Hi all,
>
> thanks for the replies. Most of you didn't read my post correctly though,
> I know that on our earth we have people with more then one FirstName, and
> some with no LastName etc. I stated however that if we had a world where
> people had only 1 FirstName and 1 LastName but it was not necessary to
> have a PhoneNumber would my first of my second structure be advisable to
> create?
>
> The schema too scattered. That is exactly the way I like to build my
> tables, the question was is it advisable? I can still get my (although
> fairly low amount of data) statements to work, takes about 1 second to
> start the search from the webbpage until the document is done again. That
> is fairly fast and well below the time limit that people tend to find
> annoying when searching for something.
>
> So in effect my databasestructure works nicely, no NULLS and lots of
> tables.
>
> Again, I will include my schema and functions as attachments.
>
> The question I asked, and will ask again, why should I add a column with
> NULL values rather then having a new table with that info instead? When
> will the NULL value be worth it. I take it there is less cost of simply
> having one table scan then joining two tables with a left join in order
> to retrive all rows.
>
> What if the PhoneNumber is an ID to another table that would look like
> this:
>
> CREATE TABLE phonenumber
> (
> phonenumber_id int2,
> phonenumber
> );
>
> with all keys etc.
>
> If I have to retrieve FirstName, LastName and PhoneNumber I would still
> have to join the two tables with a left join, since phonenumber_id has to
> match in both tables.
>
> Archie
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

Aasmund Midttun Godal

aasmund(at)godal(dot)com - http://www.godal.com/
+47 40 45 20 46

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Archibald Zimonyi 2001-12-21 15:48:50 Re: NULL values or not?
Previous Message Archibald Zimonyi 2001-12-21 15:08:07 Re: NULL values or not?