Re: more about using sets

2002-12-18 Thread Peter Brawley
Three reasons to keep a table of card types: 1. Generally as an added check, you ask the user to specifiy the card type, then ask for the number. If that card type check is data-driven, you will need less code modification over time. 2. Once MySQL comes to support stored procs, there is a case to

Re: more about using sets

2002-12-17 Thread Michael T. Babcock
Paul DuBois wrote: I just tried this script: [ ... ] I don't see anything getting flipped. Wow, I'm impressed :-). I've not actually tried this myself (as it has been a known bug in at least other db software). Good to know that MySQL has no such problem. Now testing: create table test

Re: more about using sets

2002-12-17 Thread Michael T. Babcock
Anderson, Alan R wrote: Isn't the card type a piece of derived data? You should never have to enter it directly; it's computable from (the first digit(s) of) the card number. Also note, the type of card isn't a SET option at all (it would be an ENUM) and if its used as a foreign-key relatio

RE: more about using sets

2002-12-17 Thread Anderson, Alan R
> From: David T-G [mailto:[EMAIL PROTECTED]] > ...I still have to figure > out how to make sure that our credit card types and skill levels don't > get corrupted (MC, MasterCard, mastercard, ...), but I guess that gets > enforced in the software interface, right? Isn't the card type a piece of der

Re: more about using sets

2002-12-17 Thread Michael T. Babcock
Luc Foisy wrote: We use enum extensively for 'Y' 'N' values, sort of true false. That way the values are forced to be one or the other. So any end user has to put one of those values in (if we allow it in that way, though we usually force them to use a checkbox). And its a little more viewable/un

RE: RE: more about using sets

2002-12-17 Thread Luc Foisy
> >What exactly is wrong about using ENUM's? > Changing them will kill you unless you're _very_ careful. > Using them is usually unnecessary as you could've used an ID value > pointing to another table of values. That table can then be added to > with no risk to your existing queries. As a cont

Re: more about using sets

2002-12-17 Thread Michael T. Babcock
Luc Foisy wrote: What exactly is wrong about using ENUM's? Changing them will kill you unless you're _very_ careful. Using them is usually unnecessary as you could've used an ID value pointing to another table of values. That table can then be added to with no risk to your existing queri

RE: RE: more about using sets

2002-12-17 Thread Luc Foisy
What exactly is wrong about using ENUM's? Luc sql,mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-ma

Re: more about using sets

2002-12-16 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi again -- Well, the general consensus seems to be to stay violently away from SETs and ENUMs :-) I'll certainly give that a shot. I still have to figure out how to make sure that our credit card types and skill levels don't get corrupted (MC, Mast

Re: more about using sets

2002-12-16 Thread Stefan Hinz, iConnect \(Berlin\)
6, 12169 Berlin (Germany) Telefon: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: "Adam Nelson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, December 16, 2002 10:47 PM Subject: RE: more about using sets >

RE: more about using sets

2002-12-16 Thread Adam Nelson
the way to go. Get InnoDB and use foreign keys before it's too late and you're stuck with a hodge podge system. > -Original Message- > From: Harald Fuchs [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 11:39 AM > To: [EMAIL PROTECTED] > Subject: R

Re: more about using sets

2002-12-16 Thread Michael T. Babcock
David T-G wrote: I'm still trying to get a good handle on how sets can be useful to me. You're thinking of ENUMs. SETs are for when you want multiple things selected out of a list. So perhaps, favorite colours: You have a column Colours SET('black','purple','blue','green','yellow','orange

more about using sets

2002-12-16 Thread David T-G
Hi, all -- I'm still trying to get a good handle on how sets can be useful to me. I have three scenarios so far. 1) A set of states (US Mail type, not turing type :-) I can pick from the list of states when entering address data, and storing the set entry should take less space than storing even