Re: lines in ER diagrams

On Wed, 2003-04-23 at 14:33, Lars Clausen wrote:
how do i show the following relationships ( "<" = crow

0 to many: ---0-<
1 to many: ---1-<
1 and only 1: ---1-1-
1 to 1: ----1-
0 or 1: ----0-1-

There is presently only 1-many and 1-0,1. You, the DBA, have to
implement 1-* vs 1-+ yourself using foreign keys. Specifically, the UML
shape set lacks the ability to express these things, so you have to
"hack the source code" of the ERD, so to speak, to get these things.

I'm unconvinced 1-1 is necessary since you gain nothing by denormalising
in this way, except to break up a large table into multiple smaller ones
that really should remain one large table (otherwise why 1-1?). And how,
exactly, is 1-1 different from 1-1andonly1?

There appears to be some significant work under way to improve the UML
shapes by Andrew Halper, and when done, it may be copied and repurposed
to a full-fledged Database shape set (by myself, if no-one else, but it
seems this is Andrew's ulterior motive ;)

You should read if
you're using Dia with the intent to generate SQL DDL from your ERD.

Tim Ellis
Senior Database Architect and author, tedia2sql (
If this helped you,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]