On Querying Uml Data Models With Ocl

Páginas: 21 (5164 palabras) Publicado: 23 de junio de 2012
On Querying UML data models with OCL
D.H.Akehurst and B.Bordbar
University of Kent at Canterbury, Canterbury, Kent, CT2 7NF {D.H.Akehurst, B.Bordbar}@ukc.ac.uk

Abstract. UML is the de-facto standard language for Object-Oriented analysis and design of information systems. Persistent storage and extraction of data in such systems is supported by databases and query languages. UML sustains manyaspects of software engineering; however, it does not provide explicit facility for writing queries. It is crucial for any such query language to have, at least, the expressive power of Relational Algebra, which serves as a benchmark for evaluating its expressiveness. The combination of UML and OCL can form queries with the required expressive power. However, certain extensions to OCL areessential if it is to be used effectively as a Query Language. The adoption of the ideas presented in this paper will enable query expressions to be written using OCL, that are elegant and ideally suited for use in conjunction with UML data models. This technique is illustrated by expressing the UML equivalent of an example Relational data model and associated query expressions.

1 Introduction
Thereis a long-standing approach to data modelling, based on the mathematical concept of relations. This approach is supported by Entity Relationship diagrams [6] [21] as a specification language; by relational databases [9] as a means to provide persistence; and the Standard Query Language (SQL [17]) for querying the data. More recently the Object-Oriented approach to data modelling has beendeveloped. Similarly, this is supported by the Unified Modelling Language (UML [1]), OOdatabases [3] [10] and the Object Query Language (OQL [5]). UML is the OMG's standard for object oriented modelling and has quickly become the de facto standard for specifying OO systems. A UML diagram (such as a Class Diagram) is typically not sufficient to define all aspects of the specification. Therefore, UMLprovides a textual Object Constraint Language (OCL [1] [23]), which can be used to express detailed aspects about the modelled system. OCL was originally designed specifically for expressing constraints about a UML model. However, its ability to navigate the model and form collections of objects has lead to attempts to use it as query language [18] [19] [14] [16]. It is well known that in the case ofrelational databases, in order for a query language to be useful, it must have the expressive power of a relational algebra [9] [22]. Hence, it follows that the same must be true for OO databases and their

respective query languages. In this respect, the authors of [16] discuss the expressive power of OCL, and infer that OCL in isolation is not as expressive as a relational algebra. Building upontheir approach, this paper makes use of the detailed semantics of UML and OCL to present an indirect method of forming query expressions. We show that this method leads to a technique for forming expressions that are as expressive as those formed using a relational algebra. The proposed method requires extra UML classes to be added to the model; this can be cumbersome and resource consuming.Since the UML reference model is currently undergoing a major revision [2] [8], the final part of the paper takes the opportunity to propose extensions to OCL, which enable OCL to be used as an ideal Object-Oriented Query Language. The rest of this paper is organised as follows: Section 2 discusses the relational approach to data modelling and provides a definition of a relational algebra (RA).Section 3 defines the example used throughout the paper. Section 4 discusses the problems of constructing queries using OCL. Section 5 illustrates a method by which UML and OCL in conjunction can provide all the functionality required by a query language. Section 6 proposes some extensions to the OCL core that would enable OCL query expression to be much more easily formed. Finally, the paper...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Modelado de datos UML
  • uml lenguaje unificado de datos
  • Business Modelling With Uml
  • “Querying postcolonial and borderland queer theory.” brown on brown.
  • Models count data.
  • Base de Datos y UML
  • Fire detection based on hidden markov models
  • A Primer On Static Applied General Equilibrium Models

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS