Re: 3NF question

From: jonnie <jsavell_at_gmail.com>
Date: 10 Jan 2005 22:33:57 -0800
Message-ID: <1105425237.714101.310640_at_f14g2000cwb.googlegroups.com>


-CELKO- wrote:
> Acording to ISO-11179 and basic data modeling, "id" is too vague to
be
> a data element name and RDBMS does not have objects in it.

Yes. I got raked over hot coals about this. It is not really the name ID so much as the concept of an ID (which is independent of login) that I want.

> Okay, if IT Standards and portability are not enough, then how about
> data integrity? Validation? Verification?

OK. So I am stupid. Please point me to references that discuss these problems (I didn't see much about this in SQL for Smarties). I would appreciate that very much.

> The "MAX(keycol) +1" trick is good, but you have to watch your
> isolation levels. The nice part is that you can add a check digit,
> too.

Sir, what is the check digit?

> But the trouble with any of these auto-numberings is that they cannot
> be verified in reality. I add a row and it gets 12 as its generated
> pseudo-key; I drop the row; I insert the identical row back; it gets
13
> as its generated pseudo-key. All references to 12 are screwed up
> beyond repair.

I believe that something bad will happen in any tables whose foreign key points to the primary key you just mentioned, should such a delete occur. "ON DELETE CASCADE" or "ON DELETE SET NULL" will give referring rows the business, no?

> Set up the equivalent of a old manual "Forms Manager" which has the
> numbers to be used and which tracks the "who, what, where and when"
as
> they are issued. The code is not bad at all, you do not have to use
a
> sequential order, and the check digits can be as complex as you wish.
> The audit trail also makes the Trolls in Accounting happier.

I would appreciate any reference to this technique that you could provide.

I would like to thank Joe, Alan, Vladmir and Neo for helpful comments. -jonnie Received on Tue Jan 11 2005 - 07:33:57 CET

Original text of this message