> -----Original Message-----
> From: Alex Satrapa [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, December 16, 2003 7:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [GENERAL] Any commercial shopping cart packages 
> using postgresql?
> 
> 
> Alex Satrapa wrote:
> > I'm currently exploring the Zelerate AllCommerce system
> > http://allcommerce.sourceforge.net
> 
> Ick... this product is *so* the poster child of the MySQL generation:
> 
>       #
>       # Table structure for table 'addresses'
>       #
>       CREATE TABLE addresses (
>         objid varchar(20) DEFAULT '' NOT NULL,
>         objclass varchar(20) DEFAULT '' NOT NULL,
>         objtype varchar(20) DEFAULT '' NOT NULL,
>         ...
>         PRIMARY KEY objid
>       );
> 
> No foreign keys! Look at all those "DEFAULT '' NOT NULL" 
> columns! What 
> are they thinking?

The no foreign keys thing means RI is out the window, of course.  A sea
of tables, floating in a soupy database fog of danger.

But as for the DEFAULT '' NOT NULL entries, CODD and Date eventually
decided that NULL data was a big mistake.
While SQL programmers are used to it, most end users with slim SQL
familiarity will be pretty shocked when:

        SELECT COUNT(*) FROM addresses WHERE <column> = 'some_constant'

Added with

        SELECT COUNT(*) FROM addresses WHERE NOT <column> =
'some_constant'

Is not equal to 

        SELECT COUNT(*) FROM addresses

I tend to agree that every column should have a default and not be
allowed to become NULL.  Just to keep end-user astonishment at a
minimum.

> As penance for suggesting this product, I will clean up the 
> SQL and at 
> least post my experiences with installing and using this product on 
> PostgreSQL.
> 
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
> 

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to