On Saturday, 10 November, 2012 13:09 Igor Tandetnik wrote:

> > However with SQLite there are queries which yield incoherent results:
 
> Define "incoherent". As far as I can tell, you use this term to mean "results
> you personally dislike". The results SQLite produces are in agreement - in
> other words, in coherence - with the product documentation.
 
> > INSERT INTO tab1 VALUES (42);
> > INSERT INTO tab2 VALUES (42);

> > SELECT * FROM tab1 WHERE x = '42'; --> one row
> > SELECT * FROM tab2 WHERE x = '42'; --> no rows

> > I understand that this behavior is documented, but I do think it is simply
> > wrong *for this case*.
 
> You seem to hold this truth to be self-evident, but I honestly don't
> understand why. Could you explain your reasoning to me? I assume there's more
> to it than just you finding the outcome aesthetically displeasing.

In my opinion the behaviour of SQLite is exactly correct.  It is not the job of 
the software (SQLite) to be second guessing and imposing its world-view on 
users of the software.  There may be perfectly valid and rational cases where 
the behaviour being complained about is desired and intended.  I cannot at this 
particular time state what that might be, but it cannot be ruled out.

Clearly this is a case of erroneous definition by the user (PLBKAC) with 
garbage-in resulting in garbage-out (GIGO).  In other words, this is a basic 
misunderstanding of how SQLite works.
 
> > Also I don't really care *how* this is fixed
 
> As best I can tell, so far there's no agreement that it's broken, so
> discussing how to fix it seems a bit premature.

I don't think SQLite is broken -- it is working as intended and carrying out 
the expressed intention of the user.  If the user wishes to obtain a different 
result, then the user will need to re-frame the original expression so that 
when the SQLite function is applied the result desired is obtained.

In other words, just because one wants SIN(45) to be .7071, but instead obtains 
the result .8509, does not mean that the SIN function is broken.  It merely 
means that the user input and expectation is incorrect.  The function is not 
broken, the result is exactly correct.  The user is broken for having 
expectation which do not match documented reality.

If a straight-jacket is wanted then one can always choose to wear one and use a 
language or tool where the world-view of the designer is enforced in preference 
to merely behaving in a predictable rational manner.  Microsoft is very very 
good at writing software which only works according to the Microsoft world-view 
and prevents you from doing anything not conforming to that view, even though 
such behaviour would be a perfectly valid application of the design rules of 
the product being used.

---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to