Re: I have read tons of theory...but still...one question
Date: Sun, 17 Oct 2004 15:56:44 -0500
Message-ID: <ckumal$6op$1_at_news.netins.net>
"Marshall Spight" <mspight_at_dnai.com> wrote in message
news:l3icd.193833$wV.79092_at_attbi_s54...
> "Dawn M. Wolthuis" <dwolt_at_tincat-group.comREMOVE> wrote in message
news:cks57p$kd9$1_at_news.netins.net...
> >
> > It was in this thread and I think I said it, but I meant it to be the
> > primary key of this child-table, with the person's identifier also
obviously
> > part of the key if this sub-table is not embedded in the parent table.
>
> So let me ask how this "embedded sub-table" works, because I'm
> intrigued by NFNF but haven't had an opportunity to work with
> such a system.
>
> Does the embedded sub-table (EST) have its own key? Is it unique
> across the entire relation-valued attribute, or is in only unique for
> the row?
For terminology, IBM calls it "nested" and just remember that we are talking about the logical structure. Nested lists (of one or more attributes) are ordered, but not keyed from the perspective of the toolset (that I work with) other than by the parent key and the position in the list. However, the list can be searched using values of other attrbutes, so if there is another attributes that could be considered candidate keys, then a particular row could be accessed by knowing that value as well. In the case of the toolset I work with, the uniqueness of that value within the nested list would not be enforced by the database., but by the application (typically a wrapper servicing multiple applications).
> For example, let's say I have a relation of (l=letter, set-of-(i=int,
s=string)).
> l is the key of the outer table; i is the key of the inner table. (Or is
it (l,i)?)
>
> Is this a legal table:
> a,{(1,"hello")}
> b,{(1, "world"),(2,"foo")}
>
> Two rows have a value 1 for some i.
Yes, definitely!
>
> It seems both right and wrong either way. This is pretty much my only
> (current) point of confusion about RVAs.
This is also the case with an RVA meeting SQL-99/SQL3 standards IIRC. For
both the non-1NF (pre/"post"-relational) and the newer relational model,
this permits you to retrieve child relations without an explicit join
condition.
above would yield a result set that includes 1 hello 1 world 1 foo
as a single "row" of output. Think what it takes in SQL to get the
following output from a typical structure
Name .........E-mail addresses........Phone Type.....Phone Number
John Doe jdoe_at_aol.com Home (123) 555-2783
john_doe_at_msn.com Work (123) 555-1283
Mobile
(382) 555-2983
Jane Ayee janeayee_at_a.net Mobile (732) 555-2182
Notice how the multiple nested lists (multiple 1-M child tables) are handled. There is no assumption as there is witih SQL that a single row of output has data related to each other except through the parent.
>
> > I tried to answer from a relational perspective, but I've been warped
> > by having something easier to work with at hand.
>
> Heh. You're starting to get snarky on that point. :-)
You know I've been snarky for a while now. smiles. --dawn
>
> Marshall
>
>
Received on Sun Oct 17 2004 - 22:56:44 CEST
