Re: Question on Structuring Product Attributes

From: James K. Lowden <jklowden_at_speakeasy.net>
Date: Wed, 13 Feb 2013 22:52:17 -0500
Message-Id: <20130213225217.9a9edea5.jklowden_at_speakeasy.net>


On Tue, 12 Feb 2013 04:25:09 -0800 (PST) Derek Asirvadem <derek.asirvadem_at_gmail.com> wrote:

> > What about arithmetic? Would this be accurate?
> >
> > V1 V2 = < ¬< > <&&>
> > 2 NULL F F F F F
> >
> > I'm not a Sybase expert, but you are.
>
> Anyone who told you that is exaggerating greatly.

You're too modest. What is an expert, if not someone who knows "most commands by heart"?

> I am getting tired of spending time, writing answers to your
> questions, giving you info, only to find that instead of closing the
> issues raised like a gentleman, you raise new issues from the margins
> of the new info.
...
> Hint: "comparisons to NULL yield false". Whatever derives from that
> statement, derives precisely, predictably, and consistently.

I'm really not trying to dodge your questions. You have repeated dodged mine, though. I ask a very simple question, please confirm/deny 5 truth values, and you don't. You spend hundreds of words dodging the question, all while complaining about how much time you're spending "giving me info".

> You can tell me what to call it: 2VL; non-3VL; NonVL; VeryVL;
> TrivialVL; TriVL, and I will be sure to include it in my next formal
> communication to Sybase Engineering.

Touché. I choose "non-3VL", because it's a 3VL, except not.

Look, you say everything's solved, it's totally simple, that "no one in the Sybase community knows about the non-problem, or cares about the name we have not given it". But someone is wrong on the Internet, and this time it's you. En garde!

Consider a column "a" defined as "a float NULL" in the create table statement. Then

        INSERT into T (a) values (NULL)

Now the WHERE clause:

	WHERE not a < 2 
	AND		a != 2 
	AND	not	a = 2
	AND not 	a > 2

returns the row. At least in ANSI land,

        WHERE a is NULL

returns the row and none of

	WHERE not a < 2 
	WHERE	a != 2 
	WHERE	not	a = 2
	WHERE not a > 2

does.

Quite honestly and sincerely, with no malice of intent or forethought, I don't see what problem you think is solved, or how subverting simple arithmetic doesn't create a worse problem.

Certainly

        a < 2 or a = 2 or a > 2

is always true in Boolean logic.

If it's ever false in Sybase logic, then Sybase logic is not Boolean. The *only* form of 2VL logic is Boolean, therefore Sybase logic is not 2VL. Neither is it a recognized 3VL insofar as I'm aware. (That is where we started. BTW, there is no single 3VL. I mentioned Kleene and Lukaeiwicz when I first joined this thread.)

Perhaps you willingly concede all that, but maintain the problem is solved, for practical purposes. But here, "practical" means you can put up with or internalize the inconsistencies, and work around them. Not everyone can do that, so it's practical only for those who can.

I remember problems along these lines, a long time ago, when System 10 was new. Especially nasty are tests like NOT IN, because

	from A 
	where v not in (select a from T where a = NULL)

returns every row in A, and

	from T as t
	where not exists ( 
		select 1 from T where a = t.a) 

returns all rows in T where a is NULL.

Or something like that. As I recall. I don't have a system handy to test with.

If my characterization above is correct, and you think that's "problem solved", there's probably nothing I can say that will change your mind, nor you mine.

But as to the question of whether forcing all tests with NULL to FALSE reduces the logic to 2VL, the answer must unequivocally be No.

--jkl Received on Thu Feb 14 2013 - 04:52:17 CET

Original text of this message