I know this question has been asked before and the best answers seems to be the following: Best approach to save user preferences?
However I have some additional criteria which is why I am asking this question again, I need to be able to compare 1 user's preferences to another user's preferences and quickly get the differences between the two users All user preferences will be a boolean value
What is the best way to achieve this?
I was thinking along the following lines: have a binary number which represents all the user preferences: e.g. 1100011100.. each bit corresponds to a particular preference
and then either save it as type BINARY (where I can store 255 bits i.e. 255 preference settings - is that right?) or covert the binary into int and store it as an int (then the choice is between INT or BIGINT - INT = 4*8 = 32 bits, BIGINT = 8*8 = 64 bits)
That way I only need to have 1 extra column in my user's table which stores the preferences and its easy to compare preferences between two users by simply taking the binary number
Does anyone have any other ideas about how to do what I am trying to do or see a problem in the way I am trying to do things here?
(Note Databases are not my strong point)