Quote:
Originally Posted by siLenTz I agree, it is a very great solution. However, It still have there own
disadvantage. For example: I am run my own clothes shop. My shop sell
many shirt with many difference colour. There are Red, Yellow, Black, White
and Blue. Now my customers check my website and search for shirt which
is can be Red, Yellow, Black, and it can be mix with those three colour.
So the possible outcome is: R,Y,B,RY,RB,YB,RYB. In this case you using binary
isn't so effective. Imagine if there are over 20 of difference options can
be select more than one and you want to search with keyword OR instead
of AND and it is going to be insane. |
To clearlify my post, I will provide some examples:
Here it is my database:
define that BLACK = 1, BLUE = 2, RED = 4, and WHITE = 8:
Code:
Clothes ID Clothes Colour
1 1 (black)
2 2 (blue)
3 3 (black and blue)
4 5 (black and red)
5 9 (black and white)
6 7 (black blue and red)
7 11 (black blue and white)
8 13 (black red and white)
9 15 (black blue red and white)
Now I want to search any clothes that have black color(some clothes have
multi-colour which also include black colour). I didn't mean it is impossible
but it is just difficult to search.