Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Weird Query

Re: Weird Query

From: AK <AK_TIREDOFSPAM_at_hotmail.COM>
Date: 1 Aug 2005 14:07:16 -0700
Message-ID: <1122930436.499433.157860@o13g2000cwo.googlegroups.com>


Maxim,
let's suppose I was wondering how much money I have on my checking account.

1. I didn't know, that's NULL.
2. I went to an ATM and run a query, Let's suppose I've got $100
3. I'd withdrawn $100 from the account and my receipt said I had $0.00
remaining balance.

Don't tell me that after step 3 account_balance "has no value" - it does! The value IS known - $0.00. There is a big difference between a known zero value and an unknown value.

Similarly, there is a big *practical* difference between a known zero length string and an unknown string. I have given you a very simple real life example when it is important.

>> to be able to

distinguish these cases you need to introduce new entity , ( e.g. nation
), one of those attribute can be "middle name allowed" and create a relationship between that 2 entities.
<<
I don't need any 'zero balance allowed' column to distinguish between steps 1 (unknown balance) and 3 (zero balance). Besides, in many countries, such as United States middle names are optional, not mandatory. Since a middle name is a personal choise, I don't think your suggestion would help.

BTW, other RDBMS will let me to distinguish between an empty string and an unknown one. MS SQL Server:

create table t(i int, c varchar(10))
insert into t values(1, '')
insert into t values(2, null)
select * from t where c=''

i c
----------- ----------
1

What do you think? Received on Mon Aug 01 2005 - 16:07:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US