UMLtoDB Service: Avoiding NOT NULL constraints on columns

A quick note to answer the question of a user of the UMLtoDB Service that wonders how to avoid NOT NULL attribute constraints in SQL DDL scripts generated from UML Class diagrams.

A NOT NULL constraint on a column X is the way MOLA:UMLtoDB guarantees minimum multiplicity constraints in the attributes of UML classes. Therefore, to avoid a NOT NULL constraint on column X the only thing you need to do is to make sure that the attribute X (or association, if X is part of a foreign key) has a zero minimum multiplicity.

Some tools, like ArgoUML, use a 1-minimum multiplicity as default value for all attributes so be careful to change this default option if you prefer otherwise.

If you enjoyed this post you can subscribe to this Software Modeling blog and/or follow me on twitter or through the portal’s mailing list . AND if you really liked it help me pass it ON TO others by bookmarking AND sharing the post USING the links below:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress
More in MDD, tools, UML
Simple Natural Language to Use Case script generator with yUML
ArgoEclipse
ATL 3.1.0 is available
Close