Pinned topic CLASS DIAGRAM
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
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 110000D4XK3659 Posts
Re: CLASS DIAGRAM2005-02-15T19:57:11ZThis is the accepted answer. This is the accepted answer.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.