Re: Can we solve this -- NFNF and non-1NF at Loggerheads

From: Paul <paul_at_test.com>
Date: Mon, 07 Feb 2005 13:29:06 +0000
Message-ID: <42076d22$0$7932$ed2619ec_at_ptn-nntp-reader01.plus.net>


> Well said. My suspicion is that there is little to gain in
> actually storing relations with nested relations, i.e. designing
> your database with nested tables.
>
> One possible use for nested tables/relations could be in providing a
> richer interface towards application programs and report generators.

Anything done using nested tables can be done using standard relations though (can't it?) so I can't see where the advantage lies in using the scheme below. If you just mean that the front-end application uses an interface lookng like the diagram below, well, it could do that equally as well using the standard relational design behind the scenes.

In fact, could you maybe say that any design using "nested" relations can always be transformed into a totally equivalent design without using RVAs, and vice versa? So in some some the two theories are isomorphic and really it's irrelevant which one you use? So Occam's Razor would suggest the simplest one.

I'd imagine a RDBMS engine would want to unnest nested relations for its physical implementation, because otherwise it's going to complicate things like indexing etc.

Maybe it's because I'm used to thinking relationally, but I just can't think of any examples where a RVA would be necessary or even just useful.

Paul.

> I am pasting an example here from a previous thread:
>
> Select FirstName,
> (select company,
> email
> from email_table
> where em_PersonID = PersonID) as Contact
> from Person
>
> With a result like
>
> FName Contact
> +------------------------+
> !Tom ! +--------------+ !
> ! ! !comp1 !a_at_b ! !
> ! ! +------+-------+ !
> ! ! !comp2 +c_at_d ! !
> ! ! +--------------+ !
> !------------------------!
> !Dick ! +--------------+ !
> ! ! !comp1 !e_at_f ! !
> ! ! +------+-------+ !
> ! ! !comp3 +g_at_h ! !
> ! ! +--------------+ !
> !------------------------!
> !Harry! +--------------+ !
> ! ! +--------------+ !
> +------------------------+
>
> regards,
> Lauri Pietarinen
>
Received on Mon Feb 07 2005 - 14:29:06 CET

Original text of this message