Comprehensions, a query notation for DBPLs

  • Authors:
  • Phil Trinder

  • Affiliations:
  • -

  • Venue:
  • DBPL3 Proceedings of the third international workshop on Database programming languages : bulk types & persistent data: bulk types & persistent data
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper argues that comprehensions, a construct found in some programming languages, are a good query notation for DBPLs. It is shown that, like many other query notations, comprehensions can be smoothly integrated into DBPLs and allow queries to be expressed clearly, concisely and efficiently. More significantly, two advantages of comprehensions are demonstrated. The first advantage is that, unlike conventional notations, comprehension queries combine computational power with ease of optimisation. That is, not only can comprehension queries express both recursion and computation, but equivalent comprehension transformations exist for all of the major conventional optimisations. The second advantage is that comprehensions provide a uniform notation for expressing and performing some optimisation on queries over several bulk data types. The bulk types that comprehensions can be defined over include sets, relations, bags and lists. A DBPL can also be automatically extended to provide and partially optimise comprehension queries over new bulk types constructed by the application programmer, providing that the new type has some well-defined properties.