Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Simple linking table question

Re: Simple linking table question

From: --CELKO-- <71062.1056_at_compuserve.com>
Date: 24 Mar 2003 11:08:31 -0800
Message-ID: <c0d87ec0.0303241108.79d0ef92@posting.google.com>


>> Square brackets is just what SQL Server spat out - can you get it
to produce non-proprietary DDL ... <<

Nope. That is why you edit the stuff before you post it. The damn thing still has no consistent rules for capitalizing keywords, for punctuation or anything else. I have a WORD macro I use to do the first clean up, before I move the ALTER statements to the CREATE TABLE and make the code suitable for a human being to read.

>> Just the other day in this forum someone was advising using
Hungarian notation, I thought that's what I was doing. I'm beginning to suspect that
naming conventions is one of those areas where there's no agreement on best
practice... <<

We have soemthing better! We have the ISO-11179 Standard.

A prefix was required in the early programming languages (BASIC, FORTRAN II, some assembly languages, etc.) as flags to the one-pass compilers. That is why T-SQL still used @ for parameters.

Older programmers kept the habit as languages and compilers got better. The prefixes were usually the file from which the value of a variable was read; now you see the name of the table instead.

When we did the research on this in the 1970's, the prefixes increased the time to maintain the code by 10-12% because of loss of readability. They made life even worse when we introduced data dictionaries.

Hungarian notation was meant to be used with weak typing in OO languages -- the variable can change data type on the fly without your knowledge, so you need to know where it started. SQL is a strongly typed language and it is a very high level language that holds a data model. Use names that tell you what something is, not how it is stored or where it occurs; move to an abstract level of thinking and get away from the particular hardware or implementation.  

Think of it this way: Hungarian notation was invented by Microsoft; do you associate their code with "it runs on the first release" or "it has no security leaks" or "I'm so glad Mom's heart-lung machine is running a Beta of Windows XP!" when you think of software? Received on Mon Mar 24 2003 - 13:08:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US