Encyclopedia of Database Systems

2018 Edition
| Editors: Ling Liu, M. Tamer Özsu

Object Constraint Language

  • Martin GogollaEmail author
Reference work entry
DOI: https://doi.org/10.1007/978-1-4614-8265-9_810




The Unified Modeling Language (UML) includes a textual language called Object Constraint Language (OCL). OCL allows users to navigate class diagrams, to formulate queries, and to restrict class diagrams with integrity constraints. From a practical perspective, the OCL may be viewed as an object-oriented version of the Structured Query Language (SQL) originally developed for the relational data model. From a theoretical perspective, OCL may be viewed as a variant of first-order predicate logic with quantifiers on finite domains only. OCL has a well-defined syntax [1, 3] and semantics [2].

Key Points

The central language features in OCL are: navigation, logical connectives, collections and collection operations.
  • Navigation: The navigation features in OCL allow users to determine connected objects in the class diagram by using the dot operator “. ”. Starting with an expression expr of start class C, one can apply a property propC of class Creturning, for example,...

This is a preview of subscription content, log in to check access.

Recommended Reading

  1. 1.
    OMG (ed.). OMG object constraint language specification. OMG, 2007. www.omg.org.
  2. 2.
    Richters M, Gogolla M. On formalizing the UML object constraint language OCL. In: Proceedings of the 17th International Conference on Conceptual Modeling; 1998. p. 449–64.CrossRefGoogle Scholar
  3. 3.
    Warmer J, Kleppe A. The object constraint language: getting your models ready for MDA. Boston: Addison-Wesley, Reading; 2003.Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.University of BremenBremenGermany

Section editors and affiliations

  • David W. Embley
    • 1
  1. 1.Brigham Young UniversityProvoUSA