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

Re: ER - Format Question



On 2001.07.18 01:07 Collin Rogowski wrote:
> Hi!
> 
> I started writing a program to create a relational scheme
> from a ER-digram created with dia (I later want to transform
> the scheme to SQL). I got quiet far (thanks to not having to
> write a parser), but got stuck at the following:
> 
> If a relation has a cardinality, I cannot figure out which
> connected entity is on which side. So when I have a 1:N 
> cardinality I don't know which connected entity is 1 and
> which is N.
> 
> Any ideas how to solve this problem?

Are you using the ER sheet objects or the UML sheet objects?

I can't think of a good way to do it with the ER sheet.  I'm pretty sure the ER
sheet objects data structures are not high-level enough to store schema
constraint stuff like cardinality.

I think it can be done hackily with the UML sheet objects by repeating the class
name in the "Role" field of the Association object.  Then you could write some
code to match up Association object Role field pairs with their corresponding
classes, and generate the cardinality constraint code from that.  I don't know
how difficult/easy this would be (seems difficult), or whether the hack amounts
to kosher UML.

Andy





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK