View Single Post
Old 09-16-2004, 07:13 PM  
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
Quote:
Originally posted by Mortimer
What about simply using an int column in your big table and using some basic maths... you say you have 5 types, so you assign a number to each type:
type 1 = 1
type 2 = 2
type 3 = 4
type 4 = 8
type 5 = 16
so if your entry has all 5 types, the total to enter in the int column is 31, if it has type 1, 3 and 5, the value is 21, etc.

tihis way you do not have to use any joins, you do not make your table much bigger, and you can add more types in the future without any modification to your table structure...

that's the way i'd do it
My problems with that method is it requires extra parsing in my code, as well as not being very standardized for someone who might code after me to follow....
__________________
Skype variuscr - Email varius AT gmail
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote