On Wed, Aug 13, 2008 at 9:37 PM, Brian Aker <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I got pinged in email on "Why are you keeping SET?". I have zero opinion on
> them because I have never used them.
>
> Here is an article from Mike Hillyer on them:
> http://dev.mysql.com/tech-resources/articles/mysql-set-datatype.html
>
> Are they useful? How many gotcha do they have? Should we just have a true
> Bool type?

Sets are useful for a quick and dirty (dirty being the operational
word) handling of multiple values in the same column.

On the plus side, it's a convenient way of setting several values in
one operation, and play with bitwise operators.
On the minus side, it's limited to 64 values, and it's definitely
breaking normalization.

The only good reason for keeping it is that it can make migration from
MySQL easier. If your table uses sets and you want to migrate to a
system that does not support this data type, you have to be more than
average skilled to convert the set column to a one-to-many
relationship.

Giuseppe

-- 
The Data Charmer
http://datacharmer.org/

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to