OK I admit this is a commentary more than a question, but I have to get it off my chest.
When you're aliasing a table, for pity's sake put some thought into it. I've seen two unrelated databases in the last two days which both have tables called notes. And the code all over the place aliases notes as not. For the sake of two characters you lose an awful lot of readability. That's all I'm saying. No it isn't. As for you meddling miscreants (and you know who you are) who alias every table as T1, T2, and T3. Come on, please. What does that tell anybody?
Am I the only one who gets annoyed by this kind of thing or should I get myself some real problems to worry about? :-)
asked Jun 28 '11 at 07:47 PM in Default
Your examples are about as bad as what I encounter. A previous DBA at my company used the alphabet. Everything started with A and worked its way up. I mean really, do I need a legend to have to reference which table is C and which is E, etc. I agree with you. Table aliases need to be meaningful just like table names, indexes, etc. You are not alone.
answered Jun 28 '11 at 07:50 PM
With all due respect, I'd lean towards getting some real problems. Life is too short to get all wrapped up in these kinds of details.
As you come to these crazy aliases, just leave the code cleaner than you found it and move on, knowing you've done the right thing for yourself and your profession
answered Jun 28 '11 at 07:51 PM
Get your team an editor that auto generates aliases for tables. I know mine does it (press TAB after any identifier) and I'm pretty sure SQL Prompt does it.
That makes it a little bit better.
Then, when you've done that, get your team an editor that allows alias name refactoring.
answered Jun 29 '11 at 12:04 AM
Matt Whitfield ♦♦
I had to deal with a "logical" modeling team that insisted on the stupidest standardized abbreviations you've ever seen, but my favorite was the abbreviation for "Deductible." It was turned into "ddltbl."
Maybe it's just me, but should an abbreviation ADD letters? Where did the second "L" come from?
Oh, and best of all, we were required to use this, regardless of the fact that it was screwed up. So you can go to company X today and see "ddltbl" all over the place.
In short, I feel your pain.
answered Jun 29 '11 at 04:49 AM
Grant Fritchey ♦♦