title: How do you represent different versions of the same entity type (class) in the same UML class diagram?
body: <p>I’m trying to figure out how to model a situation with following properties:</p>
  <ul>
  <li>there is a set of entity types Ei...Ej and a set of relationship types between those entity types Ri...Rj in the domain;</li>
  <li>one can distinguish at least two different versions of those entity and relationship types that are significant to different parts of the system <em>at the same time.</em></li>
  </ul>
  <p>In the simplest case, those different versions might be “real time data” version and “last approved snapshot” version. In this case, being significant to different parts of the system might translate into following:</p>
  <ul>
  <li>there are less privileged actors and use cases, that can only work with “last approved snapshot” version;</li>
  <li>at the same time there are more privileged actors with the same or different set of use cases, that can work with “real time data ” version;</li>
  <li>there are entity types Ex...Ey that either form relationships with entities ei...ej from “last approved snapshot” version or whose constraints reference values of attributes of entities ei...ej from “last approved snapshot” version;</li>
  <li>at the same time there are different entity types Ea...Eb that either form relationships with entities ei...ej from “real time data” version or whose constraints reference values of attributes of entities ei...ej from “real time data” version.</li>
  </ul>
  <p>If I want to show all entity types Ei...Ej,  Ex...Ey and Ea...Eb from aforementioned example along with their constraints and relationships between them on the same diagram, how would I do that?</p>
  <p>I was thinking about using two different classes for the same entity type: one class would represent “last approved snapshot” version of that entity type and another class would represent “real time data ” version of that type.</p>
  <p>But I don’t like this approach very much as</p>
  <ul>
  <li>it seems redundant;</li>
  <li>I’m not actually sure what kind of relationship there is between two classes representing two different versions of the same entity type a how to represent that relationship in diagrams (maybe «derive» stereotype from standard profile would be appropriate here, but I'm not sure).</li>
  </ul>
  <hr />
  <p>EDIT</p>
  <p>Unfortunately, I can’t use examples from my work, so I’ve come up with this completely fictional one, but one that is also partially modeled after the problem I was trying to solve recently. I’ll be using popular “WorksInUsing” association to pay proper respects. This will make the question more concrete.</p>
  <p>Also, to be clear, I’m trying to create conceptual model and not so much OOP/relational design/implementation model.</p>
  <p>Let’s assume an entity type Employee.</p>
  <p>Let’s assume an actor called “SkillAdministrator” managing following entity and relationship types:</p>
  <ul>
  <li>entity type Skill</li>
  <li>entity type Department</li>
  <li>relationship type KnownSkill between entity types Employee and Skill</li>
  <li>relationship type WorkInDepatment between entity types Employee and Department</li>
  </ul>
  <p>Let’s assume, that changes in all those aforementioned entity and relationship types happen rarely but when they do they happen in very large batches and our skill administrator needs quite a time to process each such change.</p>
  <p>After he’s finished processing the change, he runs PublishChange use case which creates a snapshot of entity and relationship types Skill and KnownSkill and makes that snapshot available to other users of the system.</p>
  <p>Let’s now assume an actor called Manager managing following entity and relationship types:</p>
  <ul>
  <li>entity type Project</li>
  <li>relationship type WorksInUsing between entity types Employee, Skill and Project.</li>
  </ul>
  <p>Only those Skills that existed at the last run of PublishChange use case can play role in WorksInUsing association. Also the pairs KnownSkill are precondition to triplets WorksInUsing, but again only those KnownSkill pairs, that existed at the last run of PublishChange use case.</p>
  <p>At the same time Manager is managing WorksInUsing associations, SkillAdministrator can start working on processing the next big change in entity and relationship types that he manages. Manager doesn't see those changes, not until PublishChange use case is run again.</p>
  <p>(Depending on the domain, there are multitude of different ways to handle deletion of particular skill or knownskill association by system administrator and then applying those changes - in the simplest case, both types could be assumed as permament, so new instances can be added but existing instances cannot be deleted, for examples laws work this way)</p>