• 1 reply
  • Latest Post - ‏2005-02-15T19:57:11Z by SystemAdmin
3659 Posts

Pinned topic CLASS DIAGRAM

‏2005-02-14T16:26:42Z |
In the class diagram shown in the model workspace, is there a way to specify null/not null along with attribute name and data type??
Updated on 2005-02-15T19:57:11Z at 2005-02-15T19:57:11Z by SystemAdmin
  • SystemAdmin
    3659 Posts


    DBMSs enforce not null constraints on columns in tables, but OO languages don't generally enforce whether data must exist in an attribute. The Data Modeler add-in for Rose has an indicator for null/not null in the specification for a column on a table, but there is no facility for marking an attribute in a class as requiring data at all points in the lifetime of an instance. Just because an attribute that will at some point be stored in a table may require a value when it is made persistent does not mean that it must have a value at all points before it is made persistent.

    Mapping classes to tables as a 1:1 relationship in all cases can lead to a a poor design.