RE: Order By

Well Oracle and Postgresql (the only db's I have around, I called a friend
to get Informix but he's not around), both sort the nulls last.  This makes
sense to me, as if it doesn't exist, then you probably don't care about it,
thus it sorts last.

So I guess I object to the spec.  I would like to see it changed so that
nulls sort last.

Kevin

-----Original Message-----
From: Babich, Alan [mailto:ABabich@filenet.com]
Sent: Wednesday, June 07, 2000 8:50 PM
To: 'Kevin Wiggen'; Jim Davis; www-webdav-dasl@w3.org
Subject: RE: Order By


I just looked it up. I thought the SQL spec. required nulls to sort first.
Here's what the version of the SQL spec. that I have actually says:

ANSI X3.135-1992 (Database Language SQL) in section 13.1, General Rule 3)b),
page 309, says "Whether a sort key value that is null is considered greater
or
less than a non-null value is implementation-defined, but all sort key
values that
are null shall either be considered greater than all non-null values or be
considered
less than all non-null values."

Last time I used Oracle (which was a while ago) it sorted nulls first.
To me, logically, null is even less significant than zero, so it seems right
to me
that nulls should come first. I seem to remember that DMA query requires
nulls to sort first.

I personally think it's better for everybody to do things the same way
(that's why we have specs.,
isn't it?).

We made it definite in DASL, and made nulls sort first.
Any significant objections, or are there just comments but not a true
objection?


Alan Babich

-----Original Message-----
From: Kevin Wiggen [mailto:wiggs@xythos.com]
Sent: Wednesday, June 07, 2000 3:26 PM
To: Jim Davis; www-webdav-dasl@w3.org
Subject: RE: Order By



After further review :)

The fact that nulls sort first????, if the value is null it is probably
because the property isn't defined and therefore you could care less, but
these are the ones sorted first???  The spec acts as though this is common
in ANSI standard SQL, but I have only seen the opposite from every DB I have
ever worked with (which maybe means none of them follow the standard)

Kevin


-----Original Message-----
From: Jim Davis [mailto:jrd3@alum.mit.edu]
Sent: Wednesday, June 07, 2000 7:47 AM
To: Kevin Wiggen; www-webdav-dasl@w3.org
Subject: Re: Order By


At 10:16 PM 6/6/00 -0700, Kevin Wiggen wrote:
>
>
>Does adding "Order By Content Length" (or any other file specific property)
>automatically add "AND Resource Type = File" to the Where clause of a Dasl
>Query?
>
>Or in English, does adding a file specific property to the orderby clause
in
>a dasl query implicitly make all resources that are returned files?  or do
>the directories and null resources simply sort last?

The latter.   Nowhere does  the spec say that anything is added
(implicitly) to the where clause, and I would never agree to that.  But it
does say  "In the context of the DAV:orderby element, null values are
considered to collate before any actual (i.e., non null) value, including
strings of zero length".  (5.6 in the most recent draft)

Is this a problem either technically or editorially?

regards

Jim

Received on Thursday, 8 June 2000 19:15:09 UTC