tags:

views:

1058

answers:

3

Hi,

I would like to ask if it is possible to show Generalization relationship in UML for a Domain Model although I undertstand I can do that in a Class Digram? I did not see much examples of Domain Model displying Generalization Relationship except in Class Diagram. If not possible, what is the best way to display that an Entity in a Domain Model is either a Entity A or Entity B or Entity C or Entity D etc ?

Thank you any help.

Cheers.

A: 

You need to clarify why you're distinguishing between a domain model and a class diagram.

On the one hand, your domain model could simply be a class diagram of everything that could map to your database, and consume it. Hence a generalization relationship could simply depict implementation inheritance or interface inheritance.

On the other hand, your domain model could simply express how you expect your classes to work. In which case, it could be any of the standard UML diagrams: class, sequence, collaboration, component, activity, etc.

ADD: are you talking about finding different ways to categorize your persistent entities like a tagging system? Or you could make it possible to have a persistent entity have many nodes in a category tree?

Alan
A: 

Hi,

Thank you for your reply. I am seeing how I can display in an UML domain model showing an Entity can be either Entity A or Entity B or Entity C or Entity D and so on. As such, it is something like a Categorization. One way I can think of is using Generalization. I am not sure if it is against the "rules" showing Generalization in a Domain Model as I do not see much in the samples I have found. Based on your reply, it seems that it is possible to do that?

Appreciate your feedback.

Thank you.

+2  A: 

Yes, generalization between entities in your domain model is allowed.

Basically, the domain model is a class diagram, where classes show the types of entities in your conceptual design, and not concrete programming language classes that you show in your typical class diagram.

To better find what you can or can't do, you can read the UML 2.x Superstructure specification, but it is quite complex to understand.

I generally tend to freely use whatever communicates my design, but if you are constrained to some specific modeling tool that is somewhat strict, you should become familiar with the UML specification.

Sergio Acosta