Re: sql views for denomalizing

From: dawn <dawnwolthuis_at_gmail.com>
Date: 3 Aug 2005 18:52:48 -0700
Message-ID: <1123120368.590946.34780_at_g44g2000cwa.googlegroups.com>


Marshall Spight wrote:
> dawn wrote:
> > Marshall Spight wrote:
> > > then I'd count this
> > > as a significant advantage to SQL. SQL's many-to-many handling
> > > is ... just ... beautiful.
> >
> > Beauty is in the eye of the beholder. Think of a web page with a list
> > of students in a class. Click on a student and you see all of their
> > classes with the attributes of each class. Click on the class you came
> > from and you are back to that first list. There is no need for an
> > intermediate web page to cross references these two. They can store
> > all of their references without having helper tables to do so. From a
> > logical modeling perspective, this is much more elegant, don't you
> > think?
>
> I'm not sure I follow this. We were talking about data structures
> and now you're talking about web pages.

See my (way too long, I'm sure) response to Eric. I am starting to see where the gaps are. I see data models everywhere, not just associated with a database.

> But it sounds like you're
> saying that a many-to-many table is not as good as having the
> two entities each contain a set of links to the other. If so,
> then you're comparing a data structure with no redundancy and
> that is therefor structurally immune to corruption, to one that
> has every datum twice, and that can get out of sync at the drop
> of a hat, and that needs every update to be done in two places.

Yes, I am, indeed, comparing the usefulness of a logical view of data that doesn't have a many-to-many in between table with one that does. If, behind the scenes, one of the two links is derived from set operations finding all pages that link to "me" and showing them on my page, that is fine with me (provided the performance is acceptable).

> I think the first one is the more elegant. But as you say, it's
> in the eye of the beholder.

I'll accept that. Elegance to me is tied into big-bang-for-the-buck software development. We might have beat this one to death at this point. I'm definitely catching on that when I talk about a "data model" and when someone else here talks about a "data model" we have different pictures in our heads as to where that model might need to be employed. Is that your sense as well? --dawn
>
> Marshall
Received on Thu Aug 04 2005 - 03:52:48 CEST

Original text of this message