Re: Inconsequences in SELECT/ORDER BY
Posted in 1994
->From: proberts@informix.com (Paul Roberts) ->Subject: Re: Inconsequences in SELECT/ORDER BY ->Date: 7 Apr 1994 04:52:05 GMT ->Reply-To: proberts@informix.com (Paul Roberts) ->Organization: Informix Software, Inc. -> ...omitted... -> ->You know what I hate? (try to imagine me as Andy Rooney saying this) ... ->- When you say: -> ->select col1, col2, col3 -> from prod_mast, prod_type -> where prod_mast.prod_12 = prod_type.prod_12 -> and prod_12 = 492 -> ->and the thing complains about prod_12 being "ambiguous". I mean for heaven's ->sake man, figure it out. Propogate constraints or something. Decades of work ->on artificial intelligence and you get thrown by something like this? -> -> I think I had better go and have a little rest now. -> Hello, Paul, Yeah, this bugs me, too; but I understand the reason the additional qualifier on prod_12 is needed. You have confused SEMANTIC processing (which involves meaning) with SYNTACTIC processing (which is only involved with structure). You said: -> where prod_mast.prod_12 = prod_type.prod_12 -> and prod_12 = 492 so obviously(??) BOTH prod_mast.prod_12 AND prod_type.prod_12 must be = 492. However, what if you had said: -> where prod_mast.prod_12 > prod_type.prod_12 -> and prod_12 = 492 This has the same syntactic structure, just substituting one relational operator (>) for another (=), tho' obviously the semantics is different. Now you get two different sets of results, depending on whether prod_mast.prod_12 or prod_type.prod_12 must be equal to 492. How hard do you think it would be to "propagate constraints" when the operator is "=" and to NOT propagate them when the operator is anything else? It's certainly do-able, but implementing this type of artificial intelligence will cost MANY computing cycles for each query interpreted, especially in "where" clauses with MANY conditions joined by "and"? When the performance goes down the drain, will the users be happy now that they can write queries that are less completely qualified than before? Regards, Alan ___________________________ ______________________| R. Alan Popiel |__________________________ \\ Internet: | Martin Marietta, SLS | / \\ alan@den.mmc.com | P.O. Box 179, M/S 3810 | Std disclaimers apply. / )Voice: | Denver, CO 80201-0179 USA | ( / 303-977-9998 |___________________________| (But you knew that!) \\ /________________________) (____________________________\\