Recently, I was following a discussion on extracting business knowledge from UML models. UML models, UML models, and more UML models.

Slowly a thought was emerging from my soaky brain:

hey dude, data models are models too.

code generationIn fact, a data model doesn’t always have to be represented by an ERD diagram.

It is also very feasible to diagram a data model using UML class diagrams. It even gets better when you stereotype your classes <<table>>. This enables code generation software to automagically recognize the stereotypes and – for example – generate SQL script for you.

Why on earth that could be remotely interesting?

Because your model is independent from its physical representation.

This way, you can “extract” a model from the physical database, introduce some enhancements, and re-apply the enhancements to the original physical database.

It enables you to enforce an uniform use of naming conventions.