Re: Relation subset operators

From: paul c <toledobythesea_at_oohay.ac>
Date: Sat, 06 Jun 2009 12:32:06 GMT
Message-ID: <altWl.29656$Db2.6372_at_edtnps83>


Walter Mitty wrote:
...
> Here's an attempt in Spanish
>
> "Si el conjunto de autos morados fuese un conjunto vacío,
> entonces ningun vendedor no podría vender auto morado alguno
> (nisiquiera uno) de tal modo que todos los vendedores
> los han vendido todos. "
>
> It sounds equally absurd to me. I'm not sure it's right.
> Note the double negative, and the use of a subjunctive.
> ...

Thanks. Good observations, one could say such queries are indeed subjunctive (maybe all queries are), here's Date's SQL for "Get suppliers who supply all purple parts":

SELECT DISTINCT s.*
FROM S AS s
WHERE NOT EXISTS

              ( SELECT DISTINCT p.*
                FROM   P AS p
                WHERE p.COLOR = 'Purple'
                AND      NOT EXISTS
                           ( SELECT DISTINCT sp.*
                             FROM   SP AS p
                             WHERE s.S# = sp.S#
                             AND       sp.P# = p.P# ) ).

If I'm not mistaken the answer is that all suppliers supply no purple parts. Just a consequence of FOPC.

> A guy walks into a coffee shop, and orders a coffee without cream.
> The server says, "we're all out of cream today."
> "In that case," the guy responds, "I'll have a cup of coffee without milk."
>

You might've hit the nail on the head (which the SQL accomplishes rather extravagantly by using a wrench instead of a hammer). They did that joke in a Marlene Dietrich movie, cafe scene where the guy hustling her and the (French) waiter can't take their eyes off her. Hustler asks for coffee with no cream. Waiter says there is no cream, would coffee with no milk do? So the coffee was the same, no matter whether it had no cream or no milk. Perhaps a viewpoint that life is subjunctive is the first baby step for escape from mysticism.. Received on Sat Jun 06 2009 - 14:32:06 CEST

Original text of this message