Re: NULL values or not? - Mailing list pgsql-sql

From Aasmund Midttun Godal
Subject Re: NULL values or not?
Date
Msg-id 20011221152455.4672.qmail@213-145-170-138.dd.nextgentel.com
Whole thread Raw
In response to Re: NULL values or not?  (Archibald Zimonyi <archie@netg.se>)
Responses Re: NULL values or not?
List 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@netg.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@godal.com - http://www.godal.com/
+47 40 45 20 46


pgsql-sql by date:

Previous
From: Archibald Zimonyi
Date:
Subject: Re: NULL values or not?
Next
From: Archibald Zimonyi
Date:
Subject: Re: NULL values or not?