Halloween-Problem

The Halloween problem refers to a phenomenon that can occur if a database access, in which a refresh has been tied condition of what it changes depends. It was discovered by database developers at IBM in the 70s of the 20th century. The name is derived from the date of discovery here, October 31, on which the festival of Halloween is celebrated.

Examples of the Halloween Problem

A Halloween problem occurs, for example in the following applications:

Avoidance

The SQL standard provides that prior to the application of triggers, all records should be copied into a temporary table. Changes no longer affect trigger. To avoid a Halloween problem with other tasks, such temporary tables can be created manually for the duration of a database query. This means that, for example, a salary increase for all employees with a paid below a cut-off can be performed, in a first step, all employees is calculated with correspondingly low content and stored in a temporary table. Subsequently, all employees who are included in the temporary table once increases the content.

Technical details of the emergence

One possible reason for the occurrence of a Halloween problem is that the location of a row is modified by an update. For example, require a relocation of the data of a line at the end or at another vacant site of a database update. Then go to the database system when executing the update statement simply cycle through all the records, it may happen that this shifted the records are processed one more time.

370874
de