Re: sql views for denormalizing

From: dawn <dawnwolthuis_at_gmail.com>
Date: 30 Jul 2005 09:32:33 -0700
Message-ID: <1122741153.426318.243420_at_g47g2000cwa.googlegroups.com>


Lauri wrote:
> dawn wrote:

> >>This is another question on the topic about which I have been most
> >>perplexed -- 1NF.
> >>
> >>Because we want to report against or view data potentially in a
> >>different way than the implementation data model (aka physical model),
> >>we have views. Although we put our base relations into nth normal
> >>form, we don't have such rules for the view.
> >>
> >>Since my interest is in the interface between developer and dbms, the
> >>view might be the area where the RM would have me focus (ignoring
> >>practical issues in working with views such as performance issues).
> >>
> >>IF I am writing a s/w app with a browser user interface showing and
> >>accepting data values that are laid out in a particular order on the
> >>screen, each with a label, then it might make sense to write a view
> >>that matches this web page. I could write a view of the data that
> >>joins, projects and restricts so it includes the desired.
> >>
> >>Does this view need to be in 5NF? No. 4NF? No. BCNF? No. 2NF? No. 1NF?
> >>Yes.
> >>
> >>That's where I get messed up because instead of just showing the view,
> >>I have to massage that view simply because one of the attributes on the
> >>page has cardinality greater than 1.
> >>
> >>If the view is supposed to be the view of the data, then why do we have
> >>this 1NF restriction when we don't care about the other NF's in a view?
> >>
> >>Thanks in advance for your help. --dawn
> >
> >
>
> I don't know if this is relevant to the subject but I gave some time
> ago an example of constructing a fairly complex query with repeating
> values in a column with Dataphor, a supposedly "true" RDBMS. This query
> could be contained in a view.
>
> See http://www.orafaq.net/usenet/comp.databases.theory/2002/10/30/0482.htm
>
> Note that this example uses an old version of Dataphor.

I've read it over again and have browsed through the Dataphor web site, but have not read any details about the product that might answer this question. I won't ask a ton of implementation-specific questions, but one pops to mind based on the reference to The Third Manifesto.

Although I appreciate that there are extensions or changes to the relational model to finally permit some of the structures I like to work with, such as many found in an XML data model, there is still the problem that the only complex data type (by some def of the term complex) is a relation. In particular, ordered lists are not handled by the relational model. It is a shame to have the user, rather than the dbms, have to perform inserts and deletes, reordering as needed. Surely a dbms could figure out how to interface with the user regarding lists, independent of how the dbms stores such data so that no ordering attribute needs to be modeled by any person.

>From the high level reading about Dataphor, it sounds like it might
have lists in the user interface as well as relations. Is that correct? If so, I'm very impressed.

Cheers! --dawn

> Regards,
> Lauri Pietarinen
Received on Sat Jul 30 2005 - 18:32:33 CEST

Original text of this message