Archive for the 'Modeling' category
n-ary associations in UML
July 22, 2008 12:19I just found that it is possible to modelize n-ary association in UML. I use uml all the time and never saw a class diagram with a n-ary association, but a couple of weeks ago, in a meeting, we were discussing a conceptual model representing a database schema and we were wondering if it was possible to model that in UML. So, yes, it is possible.
I didn’t found the reference in the uml specification, but I did found it in the book “The Unified Modeling Language Reference Manual, second edition” by James Rumbaugh, Ivar Jacobson and Grady Booch.
Definition: An association among three or more classes.
Semantics: Each instance of the association is an n-tuple of values, one from each of the respective classes. A single class may appear in more that one position in the association, but the values in the different positions are independent and need not be the same object.
About the multiplicity, the authors say the following: “the multiplicity is defined with respect to the other n-1 ends. For example, given a ternary association among classes (A,B,C), the multiplicity of the C end states how many C objects may appear in association with a particular pair of A and B objects.”
I guess it would be hard to enforce something like that in java or c++, but in the context of a database, that kind of constraits is easy to enforce with referential integrity, uniqueness and constraint (like oracle constraint). Maybe it is why n-ary associations are not widely used…
Categories: Database, Modeling, UML
No Comments »
Here is my first french post. Since I’m not able to blog in english, I decided to post in french to start the habit, and then I’ll see if I can continue the habit to blog in english.
Dans le contexte d’une base de données multidimensionnel, le concept de ’strictness’ appliqué à une hiérarchie signifie qu’un membre situé à un niveau inférieur appartient à un seul membre d’un niveau supérieur. Par exemple, si nous avions la hiéarchie ville > province > pays, nous pourrions dire que la relation ville -> province est strict puisqu’une ville ne peut appartenir qu’à une seule province. Il en va ainsi de la relation province > pays.
Par contre, la hiéarchie produits > type > famille n’est pas nécessairement strict puisqu’un produit (ex: biscuit oreo) peut appartenir à plusieurs types (disons les “mets préparés” et les “friandises”)
Toujours dans le contexte d’une base de données multidimensionnel, le concept de ‘completness’ signifie que tous les objets d’un niveau sont reliés à un autre objet du niveau supérieur, et que cet objet du niveau supérieur n’est pas formé d’aucun autre objet autre que ceux du niveau inférieur. Par exemple, les États-Unis sont composés de 50 états, pas un seul de plus.
Ces deux concepts sont importants à représenter dans un modèle conceptuel car ils aident à réfléchir aux données et traitement nécessaires, en plus d’apporter des indices de qualité des données recherchée.
Categories: Multidimensional Database, conceptual modeling
No Comments »


