Re: Teach SELECT DISTINCT first!
From: Laconic2 <laconic2_at_comcast.net>
Date: Thu, 29 Apr 2004 09:02:17 -0400
Message-ID: <-6Cdnf1n6489YQ3dRVn-gg_at_comcast.com>
Date: Thu, 29 Apr 2004 09:02:17 -0400
Message-ID: <-6Cdnf1n6489YQ3dRVn-gg_at_comcast.com>
OK, consider the following:
How do you represent a set inside of a computer?
One way is to use a bitmap. Take the power set of the inital set, assign
each element of the
power set a binary number, and do it in such a way that the individual
bits correspond to the individual
elements of the original set.
Now you can represent any subset of the original set as a binary number.
Yes, but you've sorted
the original set, as well. If you ask the question
{pepperoni, onion} ?= {onion, pepperoni}
and you use a bitmap representation to answer the question, you are going to end up sorting.
Is this clear? Received on Thu Apr 29 2004 - 15:02:17 CEST