Re: Some really confusing things about parent-child relationship

From: beginner16 <kaja_love160_at_yahoo.com>
Date: Thu, 16 Aug 2007 11:26:06 -0700
Message-ID: <1187288766.611755.24960_at_w3g2000hsg.googlegroups.com>


Sorry for additional questions

On Aug 16, 9:26 am, Jan Hidders <hidd..._at_gmail.com> wrote:
> On 14 aug, 20:15, beginner16 <kaja_love..._at_yahoo.com> wrote:
>
> > hello
>
> > I would really need some help with the following questions. And
> > apologies for so many of them
>
> > 1)
>
> > a)
> > In hierarchical model parent class can have several subclasses. What
> > does that mean exactly?
>
> > That an instance A of parent class can have connections to several
> > instances of certain subclass, or that an instance A can have
> > connections to two or more instances, where each instance is of
> > different subclass type, or both?
>
> The last.

The last as in "an instance A can have connections to two or more instances, where each instance is of different subclass type"?

>
> > b)
> > And why do we name some classes subclasses and other classes
> > parents?
> > It makes sense in object oriented programs, but here subclass doesn't
> > necessarily suggests more specialized version of parent class.
> > As far as I understand it, in hierarchical model we get a parent
> > child relationship by simply creating a connection between two
> > classes?!
>
> Indeed. The term subclass is here used in a very different meaning
> than in OO. Here it expresses something similar to containment. As in:
> the engine is part of the car so Engine is a subclass of Car.
>

Couldn't engine in a way be viewed as more specialized version of a parent class?
But as far as I understand it, with hierarchical model we could create a subclass that really isn't in any shape or form more specialized version of parent class. Like for example making a library type a subclass of weather entity type( library open depending on weather ) ?

> > 2)
> > My book only briefly talks about network model, so some of the
> > information on the subject is very ambiguous. For example:
>
> > a)
> > with network model child classes can have several parent classes -->
> > do we call this a M:N connection, or does M:N connection only mean
> > that an instance of certain child class is connected to several
> > instances of certain parent class and vice versa
>
> The last.
>
> > Anyhow, book divides network model in three parts:
> > * simple network model --> M:N connections are not allowed
> > * complex network model --> M:N connections are allowed
> > * limited network model
>

>
> > c
> > Now how do we know which of the two connected entity types is a
> > parent and which a child and why does it matter?
>
> It doesn't. It's an artifact of the way this model was implemented
> usually.
>

Could you elaborate a bit more on this?

> > d)
> > Next comes the mother of all confusing statements:
> > book starts claiming that between the two entity types there can be
> > several 1:N connection ( meaning just 1:N connections ... M:N
> > connections ).
> > Huh, didn't it previously claimed that complex network model allows
> > M:N connections?
>
> Hard to say without more context. Of course, saying that there can be
> several 1:N relationships doesn't exclude that there may also be
> several N:M relationships.
>

I reread that part and I think the book is saying that between the two types there can be several different 1:N connection types ( meaning just 1:N connection types )

3)
a)
Also, couldn't an instance of a subclass have several parents ( these parents being instances of parent class A ) and also several other parents ( these parents being instances of of super class B )?

b)
BTW - one of the reasons why I'm confused about this parent-child stuff is that all network diagrams presented in a book have snake like shape --> meaning if class B is connected to class A on one side and class C on the other side --> class C is connected with B on one side and with class D on other side. Point being, that no class ( in the diagrams presented in a book ) is connected to more than two classes. So I'm thinking there's got to be a reason for that?!

thank you both for helping me out Received on Thu Aug 16 2007 - 20:26:06 CEST

Original text of this message