Re: The BOOLEAN data type

From: --CELKO-- <71062.1056_at_compuserve.com>
Date: 3 Apr 2003 17:53:10 -0800
Message-ID: <c0d87ec0.0304031753.6bc55cbf_at_posting.google.com>


>> In that case the SHIPPED attribute should be a derived attribute.
But
you can not do that with SQL. <<

Unh??? Assuming the usual trick of a NULL for an unknown future date:

 SELECT order_nbr, CASE WHEN shipped_date IS NOT NULL

                        THEN 'yes' ELSE 'No ' END AS shipped_flag
   FROM Orders;

>> In a recent database design I used a PRINTED boolean attribute, and
the customer is not interested on the actual print date. <<

Yet; wait until he has to do an audit trail. People almost alway ask "When" if they are talking about an event that has legal consequences.

>> Derived attributes and integrity constraints are for that. <<

So, we put redundancy in the table design, then add extra constriants to maintain it? Bad idea! Received on Fri Apr 04 2003 - 03:53:10 CEST

Original text of this message