event: insert or update on T1
condition: new value of FKA exist in T
action: raise error
4.2 Application Example
In this example, a student either teaches at the
university or works in a company but not both at the
same time. He may not do either. To ensure this
condition it is necessary to add an exclusion
constraint between the associations "to work" and
"to teach". "to work" and "to teach" are both many-
to-one associations (N-1 & N-1). The trigger
generated in this case is as follow:
Create trigger Insert_Update_Student
Before insert or update on Student
Begin
If (NEW.FK_COMP IS NOT NULL AND
NEW.FK_UNIV IS NOT NULL)
Then RAISE_ERROR (‘exclusion constraint
violated’);
End If;
End Insert_Update_ Student;
5 CONCLUSION
In this paper, we reported a systematic study of the
use of PCs for the specification of assertions defined
on the behavior of class object participation into two
associations. Sometimes, it is necessary to use these
constraints in the CS. Thus, we have provided a
general framework for transforming PCs into
trigger-based SQL scripts. It turned out that triggers
are particularly adequate for this purpose. They are
being used in a lot of significant ways in current
database systems and applications.
We are implementing a prototype as an add-in
module for checking PCs. The verification of these
constraints is not easy. Therefore, we think that
incorporating add-in modules is a good idea to solve
PCs modeling problems, and to improve the quality
of CASE Tools.
REFERENCES
Al-Jumaily, H.T., Cuadra, D., Martinez, P. "Plugging
Active Mechanisms to Control Dynamic Aspects
Derived from the Multiplicity Constraint in UML",
The workshop of 7th International Conference on the
Unified Modeling Language, October 2004, Portugal.
Berrabah, D., Boufarès, F., Ducateau, C.F. "Analysing
UML Graphic Constraint, How to cope with OCL",
3rd International Conference on Computer Science
and its Applications, June 2005, California, USA.
Boufarès, F., Berrabah, D., Ducateau, C.F., Gargouri, F.
"Les conflits entre les contraintes dans les schémas
conceptuels de Bases de Données : UML - EER",
Journal of Information Sciences for Decision Making,
Special Issue of The 8th MCSEAI'04, 2005, N°19
Paper number 234.
Boufarès, F. "Un outil intelligent pour l’analyse des
schémas EA". Interne Report. Informatics Laboratory
of Paris Nord. University of Paris 13. 2001. France.
Ceri, S. and Widom, J. "Deriving production rules for
constraint maintenance". In Proc. of the 16th ht. Conf.
on Very Large Data Bases, pages 566-577, Brisbane,
Australia, August 1990.
Cochrane, R.J., Pirahesh, H. and Mattos, N.M.
"Integrating triggers and declarative constraints in
SQL database systems". In Proceedings of the Twenty
Second International Conference on Very Large Data
Bases, pages 567--578, Mumbai, India, September
1996.
Eisenberg, A., Melton, J., Kulkarni, K., Michels, J.,
Zemke, F. "SQL: 2003 has been published", ACM
SIGMOD Record, Volume 33, Issue 1, March 2004.
Elmasri, R., Navathe, S. "Fundamentals of Database
Systems ", Fourth Edition, Addison-Wesley, 2004.
Horowitz, B. "Intermediate states as a source of non
deterministic behavior in triggers". In Fourth
International Workshop on Research Issues in Data
Engineering: Active Database Systems, pages 148-
155, Houston, TX, February 1994.
Nanci, D., Espinasse, B. "Ingénierie des systèmes
d’information : Merise deuxième generation", (4
th
edition)". Edition-Vuibert, 2001.
OMG, editor: "UML 2.0 Object Constraint Language
Specification", OMG, 2005. http://omg.org.
Rational. http://www-306.ibm.com/software/rational/sw-
bycategory/subcategory/SW710.html
Sybase. http://www.sybase.com/products/information
management/powerdesigner.
Toby, J. Teorey, "Database Modeling & Design", Third
edition, Morgan, Kaufmann Series in data
management systems, 1999.
Company
Student
University
1
1
0..*
0..*
{exclusion}
to teach►
to work ►
ACTIVE MECHANISMS FOR CHECKING PARTICIPATION CONSTRAINTS IN UML
313