neveraskedforthis
neveraskedforthis

Reputation: 644

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 example, 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?

Upvotes: 0

Views: 1738

Answers (2)

UML GURU
UML GURU

Reputation: 1462

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.

alt text
(source: forum-omondo.com)

Upvotes: 1

Gabriel Ščerbák
Gabriel Ščerbák

Reputation: 18570

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.

Upvotes: 0

Related Questions