Re: Weird Query
- From: "AK" <AK_TIREDOFSPAM@xxxxxxxxxxx>
- Date: 1 Aug 2005 14:07:16 -0700
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?
.
- Follow-Ups:
- Re: Weird Query
- From: Maxim Demenko
- Re: Weird Query
- References:
- Weird Query
- From: Marian Aldenhövel
- Re: Weird Query
- From: Maxim Demenko
- Re: Weird Query
- From: AK
- Re: Weird Query
- From: Maxim Demenko
- Weird Query
- Prev by Date: Re: service handle not initialized error
- Next by Date: comparison information
- Previous by thread: Re: Weird Query
- Next by thread: Re: Weird Query
- Index(es):
Relevant Pages
|