Advanced query language for manipulating complex entities

https://doi.org/10.1016/S0306-4573(03)00065-7Get rights and content

Abstract

Complex entities are one of the most popular ways to model relationships among data. Especially complex entities, known as physical assemblies, are popular in several applications. Typically, complex entities consist of several parts organized at many nested levels. Contemporary query languages intended for manipulating complex entities support only extensional queries. Likewise, the user has to master the structures of complex entities completely, which is impossible if a physical assembly consists of a huge number of parts. Further, query languages do not support the manipulation of documents related to parts of physical assemblies. In this paper we introduce a novel, declarative and powerful query language, in which the above deficiencies have been eliminated. Our query language supports text information retrieval related to parts and it contains intensional and combined extensional–intensional query features. These features support making queries of new types. In the paper we give several sample queries, which demonstrate the usefulness of these query types. In addition, we show that conventional extensional queries can be formulated intuitively and compactly in our query language. Among other things this is due to our query primitives allowing removal of the explicit specification of navigation from the user.

Introduction

An information system consists of entities, their properties and relationships. Similar entities, are grouped into an entity type with a unique name. Entities belong to the extensional level (the instance level) whereas entity types belong to the intensional level (the schema level). The properties (attributes) of entity types belong to the intensional level whereas their values to the extensional level. Relationships may also be represented both at the extensional and intensional level. At the intensional level a relationship is represented through entity types and the representation at the extensional level is based on entities. A relationship may contain, in addition to participating entity types, attributes to express its characteristics.

In modeling relationships among entities three basic relationships are usually distinguished: the is-a relationship (or specialization/generalization), the association (or member-of relationship) and the part-of relationship (Motschnig-Pitrik & Kaasböll, 1999; Renguo, Dillon, Rahayu, Chang, & Gorla, 2000; Rumbaugh, Blaha, Premerlani, Eddy, & Lorensen, 1991; Rumbaugh, Jacobson, & Booch, 1999; Wand, Storey, & Weber, 1999). In the is-a relationship one organizes similar entity types hierarchically. If X and Y are entity types and X is-a Y holds then X is called the subentity type of Y and Y the superentity type of X. At the extensional level, each entity belonging to the entity type X also belongs to the entity type Y.

Association models an event, a phenomenon or a fact among independent entity types/entities. Typically, each entity type/entity participating in an association plays some role. In an association the participating entity types are assumed to be conceptually at the same level (Renguo et al., 2000).

In a part-of relationship entities/entity types are not conceptually at the same level because they have different complexity. In modeling a part-of relationship it is essential to recognize the entities/entity types that play the roles of parts in an entity/entity type which is the whole. The modeling of a part-of relationship requires structuring among entities/entity types and results in several hierarchy levels among them. Therefore transitivity is a primary characteristic of the part-of relationship. In this paper we deal only with part-of relationships.

The part-of relationship has no established terminology. For example, it has been called whole-part association (Civello, 1993), part-whole relationship (Motschnig-Pitrik & Kaasböll, 1999), whole-part relationship (Barbier, Henderson-Sellers, Opdahl, & Gogolla, 2000), part-whole hierarchy (Pazzi, 1999), part-of structure (Rousset & Hors, 1996), aggregation (Rumbaugh et al., 1991), complex object (Savnik, Tari, & Mohoric, 1999) and composition relation (Urtado & Oussalah, 1998). Here we call, by following Järvelin and Niemi (1999), a complex entity such an entity modeled by the part-of relationship whose parts are organized as several nested substructures. The context tells whether we mean its intensional or extensional level or both. Our notion of complex entity refers to a single unit, which contains all its parts and which has its own function in the real world. It is typical of physical assemblies that they are complex entities which have been constructed for a specific purpose in the real world. For example, we can consider a car as a physical assembly, which consists immediately of a body, engine, transmission, etc. and in turn, a body consists of a frame, doors and windows, etc. In other words, a car is a single unit in the real world, which is capable of moving in a controlled way whereas any of its parts has not this property.

Most database query languages support only extensional queries, i.e., query results consist only of extensional level information. We develop a declarative query language for complex entities, which supports both extensional and intensional queries.

In the semantic sense, a component and its immediate components often are of special interest in complex entities. For example, the assembly and disassembly of a complex entity usually happens in phases where a component and its immediate components are treated in one phase only. In many applications it is natural to associate a document with each part of the physical assembly at hand, e.g. for giving instructions for assembly or maintenance. Further, in many applications the manipulation of complex entities and their documentation is needed at the same time. To the best of our knowledge, our query language is the first proposal for this purpose.

The rest of the paper is organized as follows. In Section 2 we review both approaches to model complex entities and query languages for manipulating them. We shall also present the goals of our query language. In Section 3 we introduce complex entity modeling and related XML documentation of our system. In this section we also illustrate our sample application. The primitives of our query language and the notion of variable are introduced in Section 4. In Section 5 we formulate sample queries of different types. The properties and implementation of our language are discussed in Section 6. Summary is given in Section 7.

Section snippets

Related work

Complex entities are common in the real world. They have an important role in many advanced applications in engineering, manufacturing and graphics design. They have been also used for organizing medical terminologies (Liu, Halper, Gu, Geller, & Perl, 1996). Niemi and Järvelin (1995), Järvelin and Niemi (1999), like several other authors (e.g. Lambrix & Padgham, 2000; Sacks-Davis, Kent, Ramamohanarao, Thom, & Zobel, 1995; Zobel, Thom, & Sacks-Davis, 1991), have proposed complex entities for

A database for complex entities and related documents

Our system contains two components: a database component consisting of physical assemblies and a document database consisting of documents related to entity types in the physical assemblies. First we consider how a physical assembly is represented as a complex entity and next we describe how documents are associated with physical assemblies.

Query language for manipulating complex entities

Users of contemporary query languages must know which entities they manipulate. They must also know exactly the structure of complex entities and specify navigation in this structure. An advanced query language should also support queries where the user does not know these aspects in detail. For that reason our query language offers primitives for analyzing both the intensional and extensional levels and for moving between them.

Sample queries

In our query language a query has the following structure:

  • <form of result> where <primitive sequence>.


The construct <form of result> expresses the content of the result. It has the form res(x1,x2,…,xn) where res is the name selected for the result. The components x1,x2,…,xn are the columns of the result. The string where is a reserved word separating the form from the conditions the result must satisfy. In the construct <primitive sequence> primitives are connected by conjunction (comma) or

Discussion

In contemporary database query languages queries are represented mainly with intensional elements, which produce answers composed entirely of extensional information. This also applies to most query languages intended for manipulating complex entities. However, increasing attention has recently been paid to the possibility of supporting intensional queries. Intensional queries increase the expressive power and offer more intelligent query languages (Motro, 1994). In this paper we deal with

Conclusions

A powerful and declarative query language is needed for manipulating complex entities––especially physical assemblies. In contemporary query language approaches the user needs to know exactly all information in complex entities. For example, the user is expected to specify navigation paths leading to the data of interest. This is an unrealistic assumption in such physical assemblies, which consist of a large number of parts. Therefore the primitives of our query language were designed so that

Acknowledgements

This research was supported by the Academy of Finland under the grant number 52894.

References (39)

  • M. Winston et al.

    A taxonomy of part–whole relations

    Cognitive Science

    (1987)
  • F. Bancilhon et al.

    A calculus for complex objects

  • F. Barbier et al.

    The whole–part relationship in the unified modeling language: A new approach

  • R. Cattel et al.

    The object data standard: ODMG 3.0

    (2000)
  • F. Civello

    Roles for composite objects in object-oriented analysis and design

  • S. Dar et al.

    Extending SQL with generalized transitive closure

    IEEE Transactions on Knowledge and Data Engineering

    (1993)
  • M. Halper et al.

    Value propagation in object-oriented database part hierarchies

  • M. Halper et al.

    Integrating a part relationships into an open OODB system using metaclasses

  • K. Hua et al.

    Objects skeletons: An efficient navigation structure for object-oriented database systems

  • Cited by (5)

    View full text