-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter, et al --

...and then Peter Brawley said...
% 
% > Assuming a table 'clients' with a client ID and a table 'cards' with a
...
% >     type varchar(10) , # MC, Visa, AmEx, Disc, ...  maybe a set()?
% >     card int # references cards.id
% >   ) ;
% CardType could be a Set, but when a new credit card type comes along, you
% will have to bring down the table to add the type, and that is an arg for

Ewww...  Good point.  By 'bring down the table' do you mean lock it to
alter it or do you mean dump it, drop it, create it with the new
structure, and reload it?


% putting card types in their own table eg Create Table creditCardTypes (id
% smallint typeID, typeName char( 15 ), typeGif tinyGif ).

Aaagh!  Is there no end to this table madness?!? :-)

I need to learn a bit more about sets, too; it seems that it would save
me space to define all of my states in a set and then just select from
the list, letting a couple of bits hold the referenced value, but aside
from the possibility of adding other states :-) I wonder whether a set
buys me savings or just gives me a nice, limited list to prevent error.


% 
% Also you might want to read the manual on when to use char() and when to use
% varchar().

Oooh, please!  See my other post "to var or not to var", and I would very
much love a pointer to a "when to use" section.  Thanks in advance.


% >
....
% >     # last, first names
% >     lname varchar(40) ,
% >     index (lname) ,
% >     fname varchar(40) ,
% >     index (fname) ,
...
% 
% Unless you expect users to want to look up clients by firstname only, a
% lastname,firstname key should do you fine.

Because I could select on

  where NAME like 'smith%'

or such?


% 
% PB
% 


Thanks a bunch & HAND

mysql query,
:-D
- -- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9/UnRGb7uCXufRwARAoZqAKDeQGEtz6HFYIZkoh1eRgV66XqALQCgloNg
AlFgu3anMsBcQ5nMHt25q7I=
=r5MA
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to