Re: sql views for denomalizing

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 30 Jul 2005 14:22:37 -0700
Message-ID: <1122758557.555753.63860_at_g47g2000cwa.googlegroups.com>


David Cressey wrote:
> "Marshall Spight" <marshall.spight_at_gmail.com> wrote in message
> news:1122753267.167221.178610_at_g47g2000cwa.googlegroups.com...
>
> > Some phrasings of 1NF say this, and some just say "no repeated groups."
> > I've pretty much reached the conclusion that 1NF doesn't really mean
> > anything and isn't grounded in any particular theory. With, say,
> > 2NF, 3NF, and BCNF, you can point to the specific redundancy, and
> > the specific update anomalies. Can anyone do that with 1NF? It just
> > doesn't seem to fit with the other normal forms.
>
>
> There are no update anomalies associated with NFNF data. The problem with
> NFNF data is an access anomaly,
> not an update anomaly. The exact description of the access anomaly is
> rather involved, but the gist of it is
> captured by my comment over in another thread, concerning the difference
> between two columns named "Language2" and "Language3".

If, instead of Language1, Language2, ... we had a Language attribute of type set-of-string, wouldn't this access anomaly issue go away? To test whether someone spoke a specific language, you'd see if that language was in the set. For most people (or Americans, anyway) the set would have cardinality 1, but that wouldn't affect the code. If someone was mute, they'd have the empty set.

> Interestingly, no one thought to ask me why I didn't include "Language1" in
> my discussion.

Oh, of course, I was *going* to ask that, but I had to wash my hair. Now that that's done, can I ask you why you didn't include Language1 in your discussion? (Guess: because you were thinking it meant 'primary language'.)

> Moving right along, the biggest problem with normalization "rules" is that
> they have been presented as prescriptions (or proscriptions) when they
> should really be treated as descriptive. This whole business of "thou
> shalt" or "thou shalt not" in design is a bunch of crap, in my book. The
> better treatment would be: "if you do x, then be prepared for y as a
> consequence." Or, alternatively, "if y is a problem that you really need
> to avoid, then avoid doing x".

Yeah, I'll buy that. One thing I've noticed is that a lot of people have heard of normalization, but haven't heard of update anomalies, and don't know the two are linked.

> Moving along again, 1NF is the one place where I differ with Down's Law
> ("Everybody understands tables just fine.") There are a lot of people who
> don't understand the difference between tabulated data and crosstabulated
> data.

I think I understand your terms here, but just in case, I'd appreciate it if you could be more specific about what you mean by "crosstabulated data."

> Interestingly Datatrieve could view data either in a way that I'll call
> hierarchical or in a way that I'll call "proto relational".
>
> And retrieving data using CROSS (a little like a join) and then turning
> and stuffing it into a hierarchical report was so-o-o-o-o easy that it was
> beneath the dignity of snobby "real programmers". I never realized that it
> was a problem until I tried to do it without Datatrieve.

Interesting. What operations did you use to put the data into the hierarchy?
Or was it just assignment?

Marshall Received on Sat Jul 30 2005 - 23:22:37 CEST

Original text of this message