Search code examples
umldata-modelingmodeling

Modelling social security- and organizationnumber in Organization model


I'd want hear your suggestions on how to model a Organization model which could be a private person with social security number or (as in most cases) a company with organization number. Each organization then have one to many user accounts tied to it.

Any suggestions on clean/lean ways of modelling this? Right now I'm using following below where Organization is currently Customer:

enter image description here

Thanks in advance.


Solution

  • The most straightforward solution is as follows:

    • Abstract base class Organization with concrete subclasses Individual and Company
    • Social security number is an attribute of Individual
    • Organization number is an attribute of Company
    • Class UserAccount
    • Association between UserAccount and Customer; multiplicity on UserAccount side: 1..*