A common task in data intensive applications is to locate a group of items and then manipulate them, e.g. to give a bonus to all of the employees in a department. Conventional relational query languages like SQL provide facilities for such manipulation-queries, but are not smoothly integrated with a programming language and lack computational power. It has been argued that comprehensions, a construct found in some languages, are a good query notation for database programming languages. An extension to comprehensions is proposed that permits the data to be manipulated by side-effect in addition to being queried. These side-effecting queries are computationally powerful and smoothly integrated into a database programming language, unlike conventional relational query languages. Furthermore side-effecting comprehensions are concise and some may be automatically optimized.
展开▼