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.