List:General Discussion« Previous MessageNext Message »
From:Mike Diehl Date:August 8 2011 6:13am
Subject:Re: Hungarian Notation [Was Re: Too many aliases]
View as plain text  
On Saturday 06 August 2011 10:58:43 am Jan Steinman wrote:
> > From: Johnny Withers <johnny@stripped>
> > 
> >

Well, I can see this being useful in assembly language, or strongly-typed, 
non-OO languages.  But I was asking specifically about SQL!

When will this EVER make sense:?

select * from intCustomers;

We know from context that customers is a table and it makes no sense at all to 
prefix a type to it in order to make the obvious more clear.

I guess we could have:

select * from viewCustomers; 
select * from tblCustomers:

But really?

My personal convention is that table names are plural.  Foreign indexes have 
the table name as a prefix.  For example.

create table customers (
	id			integer, index.
	companies_id	integer,
	name		varchar(20)

Obviously, companies_id is a reference to the id field in a table called 

Just my $.02, but any comments are welcome.

> "The original Hungarian notation... was invented by Charles Simonyi... who
> later became Chief Architect at Microsoft."
> Ugh. That explains a lot!
> The only time I let types intrude on names is with booleans, which I try to
> name with a state-of-being verb, such as "has_paid", "is_member",
> "has_children", etc.
> > On Thu, Aug 4, 2011 at 9:41 AM, Mike Diehl <mdiehl@stripped> wrote:
> >> Well, while we're on the subject of SQL style, can anyone tell me why
> >> I'm always seeing people prefixing the name of a table with something
> >> like "tbl?"
> ----------------
> You can't do anything about the length of your life, but you can do
> something about its width and depth. -- H. L. Mencken
> :::: Jan Steinman, EcoReality Co-op ::::


Take care and have fun,
Mike Diehl.
Hungarian Notation [Was Re: Too many aliases]Jan Steinman7 Aug
  • RE: Hungarian Notation [Was Re: Too many aliases]Martin Gainty7 Aug
    • Re: Hungarian Notation [Was Re: Too many aliases]Arthur Fuller8 Aug
    • RE: Hungarian Notation [Was Re: Too many aliases]Jerry Schwartz8 Aug
      • RE: Hungarian Notation [Was Re: Too many aliases]hsv9 Aug
  • Re: Hungarian Notation [Was Re: Too many aliases]Mike Diehl8 Aug
    • Re: Hungarian Notation [Was Re: Too many aliases]hsv8 Aug
Re: Hungarian Notation [Was Re: Too many aliases]David Lerer8 Aug