Mm - I agree that the ID field does look slightly pointless in this case
- is the ID actually used as a foreign key though or do other tables
simply look in the table to see if the year is valid?
In some cases (probably not the above one), a seemingly pointless
identity column can be very useful when users say they've entered a load
of rubbish data into a table which is clustered on a character field
(and auditing is not used) - at least you know vaguely where in the
table to look...
Carol.
-----Original Message-----
From: M Stephen Kalevik
[mailto:mssqldba-ezmlmshield-x68069258.[Email address protected]
Sent: 28 June 2006 16:12
To: LazyDBA Discussion
Subject: Re: Opinions (and I know you have 'em)
I agree. The year is unique without having an additional ID. A user
datatype for how you want represent year might be useful with a rule
bound
to it for valid years might be useful. Or a validation table that has a
list of valid years.
"Brendt Hess " <mssqldba-ezmlmshield-x39229436.[Email address protected]
06/27/2006 06:36 PM
To
"LazyDBA Discussion" <[Email address protected]
cc
Subject
Opinions (and I know you have 'em)
I am in the process of evaluating and revising an existing DB that was
designed by the previous 'dba' (a programmer with minimal understanding
of relational design), and I came across this table:
Year
It contains two columns:
year_id decimal(18,0)
year int
Now, our parts data needs to reference the year (motorcycles, you know),
BUT.....
So, I decided to ask. Is there *anyone* that believes this is a correct
normalization step?
Note that a part is specifically related to one or more make/model/year
combinations, so it is possible that someone might think that this would
be
correct. But really, how can replacing one constant value with a larger
constant value, both of which will never change, be considered valid
normalization? It's like the people who replace state codes (char(2)
fields) with a table of states and an int ID field (4 bytes), when the
state
codes themselves could be the identifier.
Opinions? Yeah, I have 'em. I just want to hear some others, so that I
can
see if I am off on a tangent here.
Brendt
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
This email and any files transmitted within it are private and confidential.
If you are not the intended recipient, this email and any attachments within it have been transmitted to you in error.
You are prohibited from using, copying, distributing or otherwise using the information contained within this email.
Nothing in this email message amounts to a contractual or legal commitment on the part of Optilan unless confirmed by a communication signed on behalf of the company.
Any email cannot be guaranteed to be secure, error free or free from viruses. Although every possible care is taken by Optilan, Optilan does not accept any liability whatsoever for any loss or damage which may be caused as a result of the transmission of this message by email.
MS Sql Server LazyDBA home page