| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Stored fields ordered left to right
"Adrian Kubala" <adrian_at_sixfingeredman.net> wrote in message
news:slrnc0794s.3b7.adrian_at_sixfingeredman.net...
> Marshall Spight <mspight_at_dnai.com> schrieb:
> >> A modelling tool should deliver a straightforward mapping between the
> >> parts of the model and the parts of the system we're modeling. With
> >> relations it is easy to make such a mapping by treating relations as
> >> logical predicates: "so-and-so LIVES AT such-and-such-a-place". I don't
> >> see how such a mapping would work in general for functions.
> >
> > It's the *exact* *same* *mapping.* The only difference is that you
> > are limited to a single key.
>
> It can't be the same mapping, as proven by example; the 3-part predicate
> "person LIVES AT place DURING time period" has an obvious mapping to the
> columns of a relation. To which parts of this predicate do the DOMAIN
> and RANGE of a function correspond?
A predicate would look like this:
person IDENTIFIED BY id LIVES AT place DURING time period
I'll name the function using the plural rather than singular (for reasons I won't go into and of course there are differences of opinion on this) and the function is
PEOPLE(id) = { (place, time period) }
Marshall noted that this requires a single value as a candidate key. Functions can, however, be from a set that includes tuples as well, so even though it is correct that it is a single value for the key, that value could be a tuple.
Although with this model there are fewer tables and in particular relationship tables (as in ERD relationships) are typically lists (nestedt tables) within an entity file, when it makes sense to have a relationship table separately the domain would be a set of tuples from the domains of the entities:
STUDENT-SCHEDULE(student,term) = { (courses, days of week, start time, end
time)* }
using the XML notation of * to indicate a repeating group, i.e. nested
table.
Thank you gentlemen, I think I have the information I need on this one. Cheers! --dawn Received on Tue Jan 13 2004 - 08:13:24 CST
![]() |
![]() |