On 5/5/06, John Heim <[EMAIL PROTECTED]> wrote:
In fact, I would not gain clarity by using the 5-char codes that have been
imposed upon me. Freshman='10'. Sophomore='20'. There's even a '00' code
and a '05' for some status less than Freshman.
Imposed upon you? You're the DBA, right, not an end-user of this
data? Data values are not "imposed upon you". Perhaps they're
"introduced into an existing system" and "are not compatible".
Honestly, I'd change the system to conform to theirs. Or add their
codes to your code table and change it to varchar(5). Your system has
been proven to be not flexible enough! I don't think you can get
"them" to change their system, and it obviously works for "them".
You might gain clarity, believe it or not. Folks who work with this
data probably know that 10 is Freshman, and 20 is Sophomore, and 00 is
"someone who just applied" or whatever.
What's so difficult about changing your codes table so the code_key is
a varchar(5)? How is that more work than
translating the 5-char codes to 1-char codes and sticking
with what I've got.
??
If somebody had given me a dramitcally better way to
handle coded fields than what I'm already doing, I might have been willing
to re-write everything. But right now, I'm leaning more toward the "if it
ain't broke, don't fix it" theory.
What happens when you need more than 52 codes? And, um, it IS broke,
because the data values don't fit in it. :) If you want to change it
to conform to your standards, that's fine, but it sounds like it's
you, a DBA, who created this DB (or inherited it) up against a large
registrar system, and I'd vote that the latter had more schema design
done. No offense, I've worked for a university and I know how fubar'd
those things can be.
Changing it to your way isn't a BAD idea. I'm not saying "Run
screaming!" I'm just saying what I'd do. And of course I have no
idea how much code/whatever you'd need to change. But if you changed
your system to gracefully accept new codes by having your code_key be
varchar(5) that sounds like a win all around. *shrug*
Somebody suggested (via private email I think) that I use enum. I had
mentioned in my original message that I didn't want to do that because some
of the coded fields allow end-users to add/remove codes. But he pointed out
that that could be done via alter table commands. That's kind of scary to
me. I dunno.
Yeah, I've been convinced that altering ENUMs is a bad idea too.
-Sheeri
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]