QUOTE (datAdrenaline @ May 3 2012, 03:37 PM)
>> And the essence of my questions was, "Can I stored the final formatted versions that I want for Gender in the database, or should I stick with a 0/1 or M/F value and then have to code every place I need to display things" <<
Neither. Create a Domain Table (aka: Lookup table) ...
GenderId (primary index key, typically an Autonumber ... but could be text or just a number the sysadmin enters)
Then have a Foreign Key field in tables that have an attribute that requires gender. By doing this, you allow for changing times with respect to what gender is (Male, Female, Transgender-Female, Transgender-Male, etc.) plus it allows you to react to polital correctness if Male or Female is suddenly deamed inappropriate because you can change the name gender of Male to XY and since the Foreign Key relates to the GenderId, you have saved a ton of time by not having to modify your code base to react to the changing times.
Sad, but valid points. (When I was growing up "Men where men"!!)
Also, by using the Domain Table concept, you and leave your Foreign Key fields as Null if the gender is unknown.
With the Domain Table concept, you now don't have to calculate anything when you display your data, you simply JOIN the tblGenders table on a match between the foreign key and primary key of GenderId, then place the tblGenders.Gender field in the Select clause of your query.
Except two issues with that...
1.) I am doing this on the web, and those design decisions probably don't make as much sense as they do in MS Access.
2.) Most enterprise-level database developers I have known shy away from "Lookup Tables" because they don't scale well. That and they much up your database quick with hundreds of un-needed tables.
>> For some strange reason, though, I am inclined to store things in my database as "M" or "F". .... What should I do and why? <<
By the way, the phrasing of your topic starting post sounds an awful lot like a question a student would get on an assignment ... is this for something similar? The reason I ask is that our approach to reply's to students may yeild different pieces of information since the mode of learning has slightly different motivations --- that is not saying students don't get help, I am just saying that replies might force some deeper thought.
I am almost in my 50's!!! *LMAO*
No, you are not helping me do my homework?!
I am just anal-retentive, and I decided to go down the rabbit hole and open up the debate or "0/1" vs "M/F" vs "Male/Female".
Clearly there are pros and cons of each way.
Just figured I would refresh my rusty database mind, and see if I was forgetting a more accepted approach.