List:General Discussion« Previous MessageNext Message »
From:Colin McKinnon Date:November 16 1999 10:46am
Subject:Re: Comparing data sets
View as plain text  
At 03:24 16/12/99 -0700, Michael wrote:
>I figure there must be a way to compare two data sets with the MySQL
functions I just havn't been able to figure it out. For example;
>
>Set 1: ('Adam','Mary','Michael','Amy')
>Set 2: ('Susan','Adam','Michael')
>
>These are not separate tables! Assume Set 1 would be just one record of a
DB table with a different set on each row on the server. Set2 is known only
to the client. I'd like to do something like 
>
>SELECT count(elements in interesection(set1,('Susan','Adam','Michael')))
>FROM ...
>WHERE ...
>
>Would one of the SET or Bit functions (or combination) allow me to compare
these two sets and somehow determine the intersection. For example there
are 2 common elements between the two sets, 'Adam' and 'Michael'. Actually,
it's more important for my application that I know there is exactly 2
matches than to specify which two elements those 2 matches represent. Any
ideas?
>
This is a bit off topic; its not even a question about SQL.

MySQL is a relational database - what you propose does not conform to the
rules of normalization (breaks 1 & 2 I think). 

Find a book on relational database design - see the archive.

Colin

Thread
Comparing data setsMichael16 Nov
  • Re: Comparing data setsColin McKinnon16 Nov
    • Re: Comparing data setsBob Kline16 Nov
  • The dreaded chip comparison question ...Richard McLean16 Nov
    • Re: The dreaded chip comparison question ...sinisa16 Nov
      • Re: The dreaded chip comparison question ...Richard McLean16 Nov
        • Re: The dreaded chip comparison question ...Curtis Maurand16 Nov
          • Re: The dreaded chip comparison question ...Christopher E. Brown17 Nov
            • Re: The dreaded chip comparison question ...Van17 Nov
            • BenchmarkMatthew Clark17 Nov
              • Locking troubleLaran Coates17 Nov
                • Re: Locking troubleBob Kline17 Nov
                  • RE: Locking troubleLaran Coates17 Nov
                    • Re: Locking troubleAndré Bjärby17 Nov
                    • RE: Locking troubleBob Kline17 Nov
                • Re: Locking troublesinisa17 Nov
              • Re: BenchmarkTonu Samuel17 Nov
                • RE: BenchmarkMatthew Clark18 Nov
                  • RE: BenchmarkMichael Widenius26 Nov
              • Re: Benchmarksinisa17 Nov
          • RE: The dreaded chip comparison question ...Gordon Bissell17 Nov
          • Re: The dreaded chip comparison question ...Paul DuBois23 Nov
        • Re: The dreaded chip comparison question ...Steve Ruby16 Nov