开发者

UML Entity-Relationship Diagram for Users and Comments

I am new to entity-relationship diagrams, but I am trying to plan out a concept for an app.

Using Facebook as an e开发者_C百科xample, users can write comments on each other's walls, on their own walls, and on the walls for events and fan pages.

My question is this: How do you write a UML diagram for the relationship between a user and their comments, if their comments can be made to themselves and to other users?


UML is an object approach while entity-relational diagrams are related to data top down approach.

What I do is to mix Class diagram generating java annotations coming from my Database profile and then add Hibernate mapper to create my database.

Really cool but this is still not entity-relationship diagrams.

UML Entity-Relationship Diagram for Users and Comments


(source: forum-omondo.com)


It is true that UML is aimed towards OO, but it doesn't mean it cannot be used for data modeling. You can simply use the class diagram, which allows you to specify even foreign keys. However the tool support is questionable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜