|
|
|
date: Fri, 25 Mar 2005 09:47:12 -0600,
group: microsoft.public.visio.database.modeling
back
Re: Unique Column Names
And this "ID" suffix thing? Who the HELL invented that for a SUFFIX?
Certainly CODD is not so stupid.
And who decided to concat "_FK" to the end of names of relationships?
What kind of IDIOT would do that?
A Primary Key COLUMN is NOT a Primary Key!
OH NO!
A Primary Key is the INSTANCE OF DATA stored in a PRIMARY KEY COLUMN's
INTERSECTION with the Row.
So if you say: "This column is a primary key", you don't really mean that.
You should say: "This PRIMARY KEY COLUMN contains instances of data, each
one of which uniquely identifies the entire row."
Subtle, yes, but absolutely imperative when discussing naming conventions.
NEVER EVER USE "ID" anywhere in a data model.
A COLUMN name should reflect it's purpose in a JOIN.
If the KEY COLUMN is FOREIGN, don't call it, for example, CUSTOMER_ID!
It's not an ID if it's in the ORDER table! No, it's a FOREIGN KEY COLUMN!
The rows contain data elements which are FOREIGN KEYS, not PRIMARY KEYS!
This is because a FOREIGN KEY allows DUPLICATES, but a PRIMARY KEY DOES NOT!
Make sure you realize this, and use the correct English!
Even in a ONE TO ONE relationship, the column name should be different than
it's concomitant parent. Otherwise, you are going to get caught when it's
time to OLAP your data or reverse engineer your tables.
You see, TOOLS like ERWin actually CORRUPT the thinking process by forcing
naming that is not grammatically correct.
A JOIN between one column and another can only be resolved if the INSTANCES
of DATA are exactly the same on either side of the join. A JOIN, then, is
only resolved ONE RECORD AT A TIME!
So, let us not get confused here. The PRIMARY KEY is the value, NOT the
column.
A column is a column is a column. And that does not a KEY make!
It is the INSTANCE of the Primary Key Column at the ROW that is the KEY!
A COLUMN never uniquely identifies the ROW!
An INSTANCE of the COLUMN VALUE at the ROW uniquely identifies the ROW.
Also, a relationship is not a Foreign Key, so why concat "_FK" to the end of
a Relationship name?
That is totally ARCANE!
A relationship merely links one column to another column based on common
data elements in the fields.
Get it Straight Microsoft.
John Smith
"John Smith" wrote in message
news:LlW0e.37666$nK.1529008@news20.bellglobal.com...
> Is anyone out there interested in the Lyszinski / Reddick Naming
> Convention?
>
> I have used a slightly modified version of this convention successfully in
> many projects, and I have noticed that it is extremely useful in Reverse
> Engineering projects and OLAP projects. That is because the convention
> requires unique names for every column in any database.
>
> For example, you would never use CLIENT_ID as a field name, since it
> violates uniqueness when used as a foreign key, making reverse engineering
> and XML parsing difficult.
>
> A better name for CLIENT_ID is:
>
> intClientPK
>
> and
>
> intClientFK
>
> Still, many tools tend to automatically force their own naming. ERWin, for
> example, forces duplicate names for FK / PK pairs across tables. I find
> this extremely annoying. It's like your wedding organizer telling you what
> colour your underwear has to be!
>
> John Smith.
>
>
>
date: Fri, 25 Mar 2005 10:15:47 -0600
author: John Smith
|
|