Re: erd to db

From: Yves Guerin <>
Date: Fri, 22 Mar 2002 13:49:07 GMT
Message-ID: <nDGm8.10802$>


Thank you for your help. In fact I am coding a software to do the mapping from Dia (ER) ( to postgreSQL (SQL statement to create my tables) and I try to find out the method or the concept behind the Dia ER plugin. I used to play with Merisse ER, and I try to find on the Internet the concept of mapping ER to relational database without a true success (the explanation depends of the writer, so I get many different versions).



Yves Guerin
Groupe Interfaces
Montreal - Canada
"Jan Hidders" <> wrote in message

> "Yves Guerin" <> wrote in message
> news:bxpm8.7127$
> >
> > I have question about to map a erd to a ralational database:
> >
> > I have the following entities: E and W in binary ERD
> > E: owner of W
> > W: weak
> > E: primary key is e1
> > W: primary key is w1
> > The relationship between E and W is R and R has a primary key: r1
> I'm not sure what type of ERDs you are talking about, but in the usual
> your problem statement doesn't make sense. First, if W has a primary key
> then it is by definition not a weak entity, and second, there can be no
> thing as the primary key of a relationship other than that which is
> by the involved entity types (if there would be then it is not a
> relationship but an entity type).
> So it should have been:
> An entity type E with primary key e.
> A weak entity type W with a partial key w.
> A weak relationship R between E and W.
> The usual way to implement this is to introduce a table for E with primary
> key e, and a table for W with primary key e + w. Note that you don't need
> table for W.
> -- Jan Hidders
Received on Fri Mar 22 2002 - 14:49:07 CET

Original text of this message