Re: Entity Relationship Diagrams

From: David Cressey <cressey73_at_verizon.net>
Date: Wed, 11 Apr 2007 11:16:09 GMT
Message-ID: <Zr3Th.30139$Rg2.4845_at_trndny02>


"Gregc." <gregchilton_at_bigpond.com> wrote in message news:1176284039.467335.142540_at_b75g2000hsg.googlegroups.com...
> Hi
>
> I am currently drawing and ER diagram and am not sure about how to
> draw the diagram for the following: A bike must have at least 2 wheels
> but it may have more. The way that I would draw it is thus:
>
> BIKE-------< WHEELS (ie crows feet with no line)
>
> Would anyone have a suggestion on this.
>
> Greg
>

As Roy said, there are lots of different notations. Here's my suggestion:

Don't attempt to use the crows' feet to express anything more than "one" or "more than one" at either end.
I don't even use the little bars to express "mandatory" or "optional" , but you may differ.

If you want to express cardinality of relationships a little more precisely, I suggest the min:max notation, right next to the end of the relationship line. In the case of a bicycle which must have at least two wheels, but might have more, this would be "2:N".

As far as whether or not ER diagrams are a "good thing" that issue has surfaced repeatedly in this newsgroup. Here's my opinion:

First, let's separate out attitudes about the ER model, and attitudes about diagrams.

I like the ER model for expressing data requirements on a database. It's useful for communicating with stakeholders (uncluding users) about that subject. It is NOT useful for conveying database design, and I claim intentionally so. Many of the regulars in this newsgroup prefer modeling data requirements directly in the relational model. I don't.

Second, what about diagrams? I like diagrams. I used them, back when I was doing this stuff, as a backdrop for meetings, conversations, and presentations about the subject. However, good diagrams are simple diagrams. A diagram is useful as much for what it leaves out as for what is puts in. The problem with many diagrams is that they try to be as comprehensive as a spec would be. I claim that's a mistaken use of diagrams, and defeats the whole purpose of conveying "the big picture".

So.... I would say that there are features in an ER model that should be left out of the matching ER diagram. Minimum cardinalities beyond one is one of them, in my book. But suit yourself. Received on Wed Apr 11 2007 - 13:16:09 CEST

Original text of this message