Enforcing temporal uniqueness of index keys utilizing key-valued locking in the presence of pseudo-deleted keys
AssigneeInternational Business Machines Corporation
InventorsRobert W. Lyle, Ping Wang
Life of this patent
Estimating the term…
Abstract
Techniques are described for identifying conflicts between a prospective temporal key and an index of temporal keys, the index sorted based on a time value associated with each of the temporal keys. Embodiments determine whether a first temporal key within the index of temporal keys conflicts with the prospective temporal key. Here, the keys within the index may be sorted based upon a respective time value associated with each of the keys. Upon determining that the first temporal key conflicts with the prospective temporal key, the prospective temporal key is designated as conflicting with at least one existing temporal key in the index of temporal keys.
Claims25
A method for identifying conflicts between a prospective temporal key and an index of temporal keys, wherein the temporal keys in the index are sorted based at least in part on a time value associated with each of the temporal keys, comprising:
- determining whether a first range of time specified by a first temporal key within the index of temporal keys overlaps with a prospective range of time specified by the prospective temporal key;
- determining whether the first temporal key is a pseudo-deleted key;
- and
- determining whether the prospective temporal key conflicts with any temporal keys in the index of temporal keys, based at least in part on the determination of whether the first range of time overlaps with the prospective range of time and whether the first temporal key is a pseudo-deleted key.
A computer program product for identifying conflicts between a prospective temporal key and an index of temporal keys, comprising:
- a computer-readable storage medium having computer-readable program code embodied therewith, the computer-readable program code comprising:
- computer-readable program code to determine whether a first range of time specified by a first temporal key within the index of temporal keys overlaps with a prospective range of time specified by the prospective temporal key, wherein the temporal keys in the index of temporal keys are sorted based at least in part on a time value associated with each of the temporal keys;
- computer-readable program code to determine whether the first temporal key is a pseudo-deleted key;
- and
- computer-readable program code to determine whether the prospective temporal key conflicts with any temporal keys in the index of temporal keys, based at least in part on the determination of whether the first range of time overlaps with the prospective range of time and whether the first temporal key is a pseudo-deleted key.
A system, comprising:
- a processor;
- and
- a memory containing a program that, when executed by the processor, performs an operation for identifying conflicts between a prospective temporal key and an index of temporal keys, comprising:
- determining whether a first range of time specified by a first temporal key within the index of temporal keys overlaps with a prospective range of time specified by the prospective temporal key, wherein the temporal keys in the index of temporal keys are sorted based at least in part on a time value associated with each of the temporal keys;
- determining whether the first temporal key is a pseudo-deleted key;
- and
- determining whether the prospective temporal key conflicts with any temporal keys in the index of temporal keys, based at least in part on the determination of whether the first range of time overlaps with the prospective range of time and whether the first temporal key is a pseudo-deleted key.
A method for identifying conflicts between a prospective temporal key and an index of temporal keys, wherein the temporal keys in the index are sorted based at least in part on a time value associated with each of the temporal keys, comprising:
- scanning the index of temporal keys to identify a next temporal key that potentially conflicts with the prospective temporal key;
- and
- determining whether the prospective temporal key conflicts with the next key, based at least in part on a determination of whether the prospective temporal key conflicts with the next temporal key and whether the next temporal key is a pseudo-deleted key,
- wherein the scanning and determining steps are repeated until (i) a first temporal key with a different principal key value from the prospective temporal key is found, (ii) a non-overlapping temporal key that is not pseudo-deleted is found, the non-overlapping temporal key having an ending time after a starting time of the prospective temporal key, or (iii) no potentially conflicting keys remain in the index.
Dependencies are inferred from the claim text.