Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.mysql > #5506

Re: select problem

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.databases.mysql
Subject Re: select problem
Date 2014-06-27 11:01 +0200
Organization PointedEars Software (PES)
Message-ID <3705418.IRWcGsfNDH@PointedEars.de> (permalink)
References (4 earlier) <MPG.2e1603f085226ce0d5@news.albasani.net> <lofqlk$sdo$3@dont-email.me> <log1os$n0s$1@dont-email.me> <logfvg$sdo$6@dont-email.me> <f9OdnXyxeZkgdzbOnZ2dnUVZ_gOdnZ2d@posted.internetamerica>

Show all headers | View raw


Gordon Burditt wrote:

> [Denis McMahon wrote:]
>> Consider a richardian database[1] of fields (title, actor1, actor2):
>> 
>> select title, actor1, actor2 from stories where actor1 = 'fred' and
>> actor2 = 'jim';
>> 
>> will actor1 and actor2 in the result record set ever have values other
>> than "fred" and "jim" as specified in the query?
> 
> They might contain those names incorrectly capitalized, as in 'fREd'
> and 'jiM', assuming a case-insensitive comparison is being done.

Also, even then there could be actor1 = 'jim' and actor2 = 'fred' instead.  
In such a table, column order need not signify importance, nor would 
importance be necessarily important for a query.  As a result, you would 
have to use several ORs or INs if you did not care about importance, which 
can quickly become unmaintainable [e.g., P(5, 5) = 5!/((5 − 5)!) = 120].

Do not do this, ever.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Back to comp.databases.mysql | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

select problem Onno Dreischor <onno@ongeldig.nl> - 2014-06-25 19:19 +0200
  Re: select problem Lennart Jonsson <erik.lennart.jonsson@gmail.com> - 2014-06-25 19:53 +0200
    Re: select problem Onno Dreischor <onno@ongeldig.nl> - 2014-06-25 23:02 +0200
    Re: select problem Onno Dreischor <onno@ongeldig.nl> - 2014-06-25 23:06 +0200
      Re: select problem Geoff Muldoon <geoff.muldoon@invalid.invalid> - 2014-06-26 09:18 +1000
        Re: select problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-26 00:48 +0000
          Re: select problem Geoff Muldoon <geoff.muldoon@invalid.invalid> - 2014-06-26 11:11 +1000
          Re: select problem Jerry Stuckle <jstucklex@attglobal.net> - 2014-06-25 22:50 -0400
            Re: select problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-26 06:52 +0000
              Re: select problem gordonb.dfadr@burditt.org (Gordon Burditt) - 2014-06-26 04:41 -0500
                Re: select problem Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-06-26 11:09 +0000
                Re: select problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-27 11:01 +0200
  Re: select problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-25 21:45 +0000
  Re: select problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-27 09:00 +0200
    Re: select problem Onno Dreischor <onno@ongeldig.nl> - 2014-06-27 20:06 +0200
      Re: select problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-27 23:03 +0200
        Re: select problem "Erick T. Barkhuis" <erick.use-net@ardane.c.o.m> - 2014-06-28 13:00 +0000
      Re: select problem Jerry Stuckle <jstucklex@attglobal.net> - 2014-06-28 22:36 -0400

csiph-web