Patent ID: 8909681

Claim:
A method for gap detection in a temporally unique index in a relational database, comprising: providing a temporally unique index in a relational database, wherein the temporally unique index includes a first set of keys, wherein each key in the first set of keys includes one or more non-temporal key parts and two temporal key parts indicating a temporal beginning value and a temporal end value; and in response to receiving one of an insert statement, an update statement, and a delete statement pertaining to a changed row in the relational database, identifying rows in the temporally unique index that have identical non-temporal key parts to the changed row, and comparing the temporal key parts of the identified rows to the temporal key parts of the changed row to determine: whether the changed row is directly adjacent to both a temporally earlier row and to a temporally later row, whether a gap is detected between the changed row and a temporally earlier row, or whether a gap is detected between the changed row and a temporally later row.