On the expressive power of update primitives

  • Authors:
  • Tom J. Ameloot;Jan Van den Bussche;Emmanuel Waller

  • Affiliations:
  • Hasselt University and transnational University of Limburg, Hasselt, Belgium;Hasselt University and transnational University of Limburg, Hasselt, Belgium;Université Paris-Sud, Orsay, France

  • Venue:
  • Proceedings of the 32nd symposium on Principles of database systems
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

The SQL standard offers three primitive operations (insert, delete, and update which is here called modify) to update a relation based on a generic query. This paper compares the expressiveness of programs composed of these three operations, with the general notion of update that simply replaces the content of the relation by the result of a query. It turns out that replacing cannot be expressed in terms of insertions, deletions, and modifications, and neither can modifications be expressed in terms of insertions and deletions. The expressive power gained by if-then-else control flow in programs is investigated as well. Different ways to perform replacing are discussed: using a temporary variable; using the new SQL merge operation; using SQL's data change delta tables; or using queries involving object creation or arithmetic. Finally the paper investigates the power of alternating the different primitives. For example, an insertion followed by a modification cannot always be expressed as a modification followed by an insertion.