List:General Discussion« Previous MessageNext Message »
From:shawn wilson Date:August 3 2011 3:43pm
Subject:RE: Too many aliases
View as plain text  
On Aug 3, 2011 9:24 AM, "David Lerer" <DLerer@stripped> wrote:
>
> I rarely use aliases (unless rarely required in self-join queries).
> When I have that option, I create unique columns by prefixing every
> table (and its objects) with a number.
> Something like:
> Create table T1234_Employee
>  (C1234_Employee_id number(5),
>   C1234_employee_status char(1)...)
>  Index X1234_Employee_Id on .... Etc.
>
> Yes, the column names may be longer this way, but easy to refer to and
> easy to communicate (by specifying a table number). I wonder what others
> think about it.
>

Looks COBOL-ish (IIRC what COBOL looks like) :)

I much prefer shorter names but can agree that, if this leads to obscurity,
use the namespace the engine provided you. I don't like typing if I don't
have to but I *hate* saying, 'what the hell was I thinking'.

I generally call index fields ix_*, foreign key columns *_fk, primary key
columns *_pk, constraints table_field. That's about it.

Thread
Which is betterAdarsh Sharma2 Aug
  • RE: Which is betterShafi AHMED2 Aug
  • Too many aliaseshsv2 Aug
    • Re: Too many aliasesRik Wasmus3 Aug
      • RE: Too many aliasesDavid Lerer3 Aug
        • RE: Too many aliasesshawn wilson3 Aug
        • RE: Too many aliasesJerry Schwartz4 Aug
      • Re: Too many aliaseshsv4 Aug
        • RE: Too many aliasesDavid Lerer4 Aug
          • Re: Too many aliasesMike Diehl4 Aug
            • Re: Too many aliasesJohnny Withers4 Aug
              • Re: Too many aliaseshsv6 Aug
                • Re: Too many aliasesJohnny Withers7 Aug
  • Re: Which is betterMySQL)2 Aug
    • RE: Which is betterDavid Lerer2 Aug
Re: Which is betterPrabhat Kumar2 Aug