Abstract

Context The success of the UML for software development has encouraged the use of this notation also for database modelling. However, academic textbooks dedicate only few sections of a chapter to present the use of UML class diagrams as alternative to ER diagrams. The consequence is that even if students use UML for analysis and design activities, they prefer ER to model the database since their knowledge about ER is more consolidated than UML for database design.
Goal Experiments involving academic students revealed that UML class diagrams can be generally more compre- hensible and easier to modify than ER diagrams when used for database design. However, those experiments also revealed that UML class diagrams are characterised by weaknesses related to the representation of Composite attribute, Multi-value attribute, and Weak entity. In this paper, we analyse a possible way to overcome them.
Method We carried out a family of controlled experiments with a total of 239 students from Spanish and Italian universities, considering ER and UML class diagrams to model database as well as a simple extension of the latter aimed at overcoming its three identified weaknesses.
Results A simple extension based on the use of stereotypes allows to overcome these weaknesses and makes UML class diagrams at least as comprehensible as ER diagrams in the context of data modelling.
Conclusions Our findings suggest, to some extent, that a solution to reduce the gap between ER and UML class diagrams for data modelling can be found. This possibility should encourage to promote the use of UML class diagrams for modelling both the logical structure of OO software systems and the database in academic courses.

Experimental Material

Design downloaded from free website templates.