List:General Discussion« Previous MessageNext Message »
From:Marilyn Davis Date:April 7 2005 9:20pm
Subject:set type and normalize
View as plain text  
Hi MySQL people.  

I'm trying to understand the pros and cons of the "set" column type.

Here is an excerpt from the article:

http://dev.mysql.com/tech-resources/articles/mysql-set-datatype.html


      Why You Shouldn't Use SET

"Third, using a set means your data is not normalized. In our above
example, we are tracking a person's interests for a hypothetical
dating site. In a normalized schema, there should be three tables: one
for the person, one for all possible interests, and one that links a
person to their particular interests."

The "above example" is:

  CREATE TABLE set_test(
    rowid INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    myset SET('Travel','Sports','Dancing','Fine Dining')
  );

I guess I'm not understanding the point here.  What practical
advantage is there to creating three tables instead of using a set
column type?

Thank you for any help.

Marilyn Davis



Thread
set type and normalizeMarilyn Davis7 Apr
  • Re: set type and normalizeBrent Baisley7 Apr
    • Re: set type and normalizeMarilyn Davis8 Apr
      • Re: set type and normalizeBrent Baisley8 Apr
        • Re: set type and normalizeMarilyn Davis9 Apr
  • Re: set type and normalizeMichael Stassen8 Apr