The Entity-relationship (ER) was (well, still is in the database community) a popular modeling language to define the (static) conceptual schema of your system. UML class diagrams (with a bit of help from OCL) can be regarded as a superset of the ER language, which explains why ER is slowly disappearing (e.g. some years ago, Extended ER was still taught in database courses while UML was taught in software engineering courses, while now most universities are shifting towards using UML in both kinds of courses).

Nevertheless, there is one thing I do miss from my times as ER modeler. The simplicity of defining external identifiers for each type/class by just underscoring the name of the attribute/s that can be used to identify a single instance of the class. Instead, to do this in UML you need to write an OCL constraint that enforces the uniqueness of the attribute/s (and then, of course, you’ll need somebody/some tool able to understand OCL, to detect that the OCL expression has this uniqueness semantic and enforce the same semantics at the code level).

You could argue that UML is object-oriented so each instance of a class has its own internal identifier. True, but “humans” don’t work with internal identifiers but with external ones. Therefore, when implementing any application you’ll be forced to provide search and query capabilities that allow users to retrieve the objects they are interested in based on their external identifier.

So, since I believe external identifiers are an important concept I propose to add them to the next version of the standard !!! There are so many things already in the standard that one more would not make it worse 🙂

Want to build better software faster?

Want to build better software faster?

Get the latest news in software modeling, model-based and low-code development

Thanks for your interest. Check your inbox and confirm your subscription!

Pin It on Pinterest

Share This