English > Support

Using NULL in Advanced Search

<< < (6/10) > >>

mgpw4me@yahoo.com:

--- Quote from: rick.ca on March 06, 2010, 07:39:53 am ---Help. This sounds important, but I can't think why. Can you give an example of where this is important—in the UI?

--- End quote ---

I'm thinking more of birthdays and dates of death than anything.  It isn't critical information since it's unlikely I'd sort by either field, but it makes a nice supplementary fact (like place of birth).  Since there is limited manipulation of these values, a string value would probably work...age determination would require conversion, but I can't think of anything else.

AimHere:
I'll let you guys try to sort this out.  ;D

If it were up to me, I'd like to see "NULL" mean a blank or empty field (including fields that at one time had data but which are CURRENTLY blank/empty), and "NOT NULL" mean anything else (including numeric "zero"). Further, clearing/blanking a field should reset it to NULL status, unlike now.

And the conditions "IS NULL" and "= 0" should NOT be equivalent. A value of zero is still a value, not a "null". Then "null/not null" would have NO relation to "zero" (or any other value) other than the obvious (i.e. if the field contains "zero", then it is NOT "null").

For this to be truly useful, though, PVD would have to leave ALL fields in a new record empty/blank/NULL unless otherwise specified, rather than filling in Year/Budget/BoxOffice with numeric zero like it does now. (Remember, at one time those three fields WERE left empty or "null" by default, unlike now.)

And the various "Rating" fields should make a distinction between "blank/null/unrated" and "zero", instead of treating them as equivalent! That way, a user could actually give a movie a rating of zero, without it being confused with an UNrated status. Perhaps the user interface could be modified to "ghost out" the "star bar" next to "Rating", or simply say "Unrated", for blank/null ratings. Any rating value (from 0 to 10) would cause the stars to appear normally (including all-empty stars for a zero rating), while clearing out the text box would reset the "star bar" to ghosted/unrated status.

This is the only behavior that would really make sense to me, and I suspect, the majority of users.

Aimhere

rick.ca:

--- Quote ---God knows how many records I updated using NULL and NOT NULL while importing my 5500 movies to PVD from other collections
--- End quote ---

My experience may be different from yours for because...


--- Quote from: AimHere on March 06, 2010, 02:54:34 am ---In this case, the anomaly can be explained by this: When I first started using PVD, each new record added had a blank "Budget" field, whether I added the movie manually, by "New Movie Master", or by scanning files on disc. So those records have a truly NULL value for "Budget". BUT, at some point (possibly around the end of May '09), the behavior of PVD changed so that new records got a "Budget" value of ZERO if not otherwise specified. (A "Budget" of zero does not appear in the normal viewing mode, but will show up in Edit Mode, i.e. the field will actually have a "0" in it, as opposed to the older records where "Budget" is BLANK).
--- End quote ---

But whatever the reason, I've always found the technique of limited use if for not other reason than I have to question the results. I might find the idea of leaving NULL as it is more acceptable if we had more control over the relevant values. Maybe that will come with a new Multiple Movies Editor that allows any field to be set to NULL, blank (text) or 0 (numeric). That would allow me to use NULL to indicate "I see no cheese" and the others would mean "there is no cheese." It's still not very convenient, however, because NULL will still include the empty/0 values (I have to bookmark them to distinguish them). And then there's the issue of NOT NULL not returning a result intuitively consistent with the NULL result.

But it seems that not even this is feasible, because...


--- Quote ---As mgpw4me has pointed out, there really is no way to set a NULL value on any field in PVD. Not-NULL values are created anytime a value is assigned to a field, and remain not-NULL forever, even if the field is cleared out or set to zero.
--- End quote ---

buah:
All what we said here made me thought of "NULL" as a "application/database is not aware of it" and for NOT NULL as a "application/database is/became aware of it", rather than unknown/known, empty/not-empty, blank/not-blank, etc...

rick.ca:

--- Quote from: AimHere on March 06, 2010, 08:26:15 pm ---This is the only behavior that would really make sense to me, and I suspect, the majority of users.
--- End quote ---

You've got to be kidding! The majority of users aren't even aware of the issue or haven't found a reason to care. Most of the rest are confused because the technical operation of the NULL operator does not yield a result that is intuitive in the circumstances. It's the lack of consideration of what is sensible to the average non-technical user that is the source of the problem in the first place.


--- Quote ---And the conditions "IS NULL" and "= 0" should NOT be equivalent. A value  of zero is still a value, not a "null". Then "null/not null" would have NO relation to "zero" (or any other value) other than the obvious (i.e. if the field contains "zero", then it is NOT "null").
--- End quote ---

This is technically correct, but doesn't have any bearing on the question at hand, until it's decided it should. I contend that it should not. As I've pointed out a number of times in a number of different ways, there's no reason why NULL and 0 should not be equivalent—if that is simpler and appropriate for the situation at hand. I'm not suggesting there's no circumstance in which different meanings would be appropriate—but they do seem difficult to find. For most users in most situations, they both mean the same thing, and any attempt to make a distinction therefore only causes unnecessary confusion.


--- Quote ---And the various "Rating" fields should make a distinction between "blank/null/unrated" and "zero", instead of treating them as equivalent!
--- End quote ---

And this is the perfect illustration of my general point. There's absolutely no justification for the assertion there "should" be "zero" rating. As a rating scale, there's nothing wrong with it starting at 1. It is, in fact, far more sensible than what you suggest. Using stars alone, there's no practical way to distinguish between NULL and 0. And there's no reason to rate something 0 when you can just as easily decide 1 has the exact same meaning. It's also obvious most users will find it perfectly intuitive the way it is. With a 0 rating allowed, we'd be forever explaining the distinction between "0" and "unrated."

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version