Re: Relation or attribute and why

From: x <x_at_not-exists.org>
Date: Tue, 23 May 2006 09:50:37 +0300
Message-ID: <e4ub71$jvk$1_at_emma.aioe.org>


"dawn" <dawnwolthuis_at_gmail.com> wrote in message news:1148340654.857359.81570_at_g10g2000cwb.googlegroups.com...
> x wrote:
> > "dawn" <dawnwolthuis_at_gmail.com> wrote in message
> > news:1147990242.573989.100810_at_g10g2000cwb.googlegroups.com...
> > > x wrote:
> > > > "dawn" <dawnwolthuis_at_gmail.com> wrote in message
> > > > news:1147826073.046909.174590_at_u72g2000cwu.googlegroups.com...

> In a conceptual data model we might have three nouns: name, firstName,
> and lastName. name has-a firstName and name has-a lastName. So, we
> dump "name" from the LDM (or include it as derived if we are modeling
> derived attributes too). What is the "rule of thumb" that causes us to
> not make name either a relation or an attribute in our LDM, but to
> ditch it?

See why I asked you if you studied abstract algebra ?

> > > Is there a guideline for this that we could state in terms of
> > > functional dependencies or otherwise that would lead us to a noun such
> > > as "name" becoming a derived attribute rather than a set?
> >
> > Have you studied abstract algebra ?

> I am hard pressed to see how algebra is related to eliminating "name"
> when going from the CDM to the LDM, I'm all ears if you have an
> algebraic response [but yes once upon a time, roughly a quarter of a
> century ago]

As long as you need name (=firstName+lastName ?) AND firstName, lastName you should have all of them.
What is derived and what is base does not matter. You should be able to switch between several bases.
The equality name=firstName+lastName should be enforced by the DBMS. If name<>firstName+lastName then we have an inequation. Read the section about weak dependecies in Codd paper.

> > >What is the
> > > technique (is it a normalization technique, is it based on FDs?) that
> > > might eliminate "name" in going from the conceptual to the logical
data
> > > model?
> >
> > I don't understand your example (I don't have the patience to decode it
> > right now), but I'll say that if you need "name" why do you want to
remove
> > it ?

> Because it is composed to two attributes that are "easier" to implement
> on their own without dragging the immediate "relation" to which they
> belong into the picture. Instead of Person(personId, nameId, ...) plus
> Name(nameId, firstName, lastName) it is more often modeled as
> Person(personId, firstName, lastName...)

> Why? What rule or practice is being employed when we drop a noun like
> "name" when going from a CDM to an LDM? Thanks. --dawn

For no reason.
I'll add that those xxxId are not part of the domain of discourse and are an implementation tool that should not be visible to users. Because the implementation details should be handled by the DBMS, let the DBMS to generate those Ids and handle them under the cover for us. Received on Tue May 23 2006 - 08:50:37 CEST

Original text of this message