[KLUG Programming] questions on picking data types

Rusty Yonkers therustycook at yahoo.com
Wed Jul 14 12:17:32 EDT 2004


I am setting up the table structure for my new program.  I have some
items in some of the tables that I am struggling with what to use for
the data type.  For example I need gender.  I am thinking of using
ENUM so that I can have m or f listed as the choices.  I could also
use a binary type if that exists in mysql.  I would like to use a
binary type for questions that are y or n like if they have been in
for prior treatment, or if they are visually impaired.  

Am I assuming right also that with the ENUM data type that I will
have the list available within the GUI programming environment in a
dropdown list?  Is that dependant on the programming environment that
I am using (i.e. RealBASIC or PHP or VisualBASIC)?  

For doing the Social security number, I am thinking of creating three
fields one for each of the three parts of the number so that I can
have three fields on the screen and make it easier to make sure
people enter it in consistantly.  I was thinking that I would just
use smallint for each of the three fields.  Is it much better to make
the middle two digit number a tinyint since I would never have
anything higher than 99 in that field?



=====
Russell C. Yonkers Jr. 
CNE, MCP, A+, CCNA, Linux+, Server+, Network+ certified
-----------------------------------------
Currently using SuSE 9, Mac OS X, Windows 2000, and WinXP 
And yes I run a network at home with Linux and Windows servers
See my personal website http://www.geocities.com/therustycook
Or my consulting site at http://www.atomicsupergeek.com


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


More information about the Programming mailing list