Re: Newbie help with ER diagrams

From: Jan Hidders <hidders_at_hcoss.uia.ac.be>
Date: 5 Dec 2002 10:21:06 +0100
Message-ID: <3def1a82$1_at_news.uia.ac.be>


In article <LdEH9.25136$EY.4943_at_fe01>, me <toenails777_at_hotmail.com> wrote:
>Hello all. I was wondering if anyone could help me with an ER diagram I'm
>trying to build, but I don't see how to do it. I can see how to do it in a
>programming language say C++, but not with ER diagrams.
>
>Suppose I have three entities: A, B, and C. B "is a" A, and C "is a A"
>also, but B also "has a" C. In programming, I'd have:
>
>class A
>{
>};
>
>class C: public A
>{
>};
>
>class B: public A
>{
> C myCClass;
>};
>
>In an ER diagram, I guess I want to express aggregation. So I have:
>
> -------------
> | A |
> -------------
> | |
> | |
> ------ ------
> \ is a / \ is a /
> \ / \ /
> \ / \ /
> | |
> | |
> ------ ------
> | B | | C |
> ------ ------
>
>How would I express aggregation between B and C?

You add a relationship between B and C with a name like 'contains'. The cardinalities for your C++ example are something like - every B contains at least one and at moste one C (i.e. exactly one C) - every C is contained in at most one B
but this may depend upon what you are modelling exactly. Some ER techniques have a special notation cq. name for such aggregation relationships, and some don't, so that depends on what ER technique you are using exactly.

  • Jan Hidders
Received on Thu Dec 05 2002 - 10:21:06 CET

Original text of this message