Method for referential constraint enforcement in a database management system
DCFirst Claim
1. In a method for performing operations in a data base management system, such operations including manipulating multiple records of data,the improvement characterized by steps performed by a computer of manipulating each record and enforcing referential constraints respecting such record before another record is manipulated by a same operation.
2 Assignments
Litigations
0 Petitions
Accused Products
Abstract
A method is disclosed for enforcing referential constraints on a record-by-record basis, immediately before or after each record is manipulated and while the record is still accessed, significantly improving the system'"'"'s performance. Each record is visited only once to do both the constraint checking and the manipulation (insert/update/delete). If the constraint checking fails, then the entire relational operation of which the record manipulation is a part is backed out. For insertions, each record is first inserted 30, and then constraints respective the record are enforced 32,34. For updates, the record is updated 48 after constraints respecting the record'"'"'s primary key are enforced 40,42, and before constraints respecting its foreign key(s) are enforced 44,46. Deletions are performed 52 before the constraints on the deleted record are enforced 54,56. Cascade deleted 58 are handled recursively 60. The method correctly processes cyclic constraints and self-referencing rows without special handling.
89 Citations
10 Claims
-
1. In a method for performing operations in a data base management system, such operations including manipulating multiple records of data,
the improvement characterized by steps performed by a computer of manipulating each record and enforcing referential constraints respecting such record before another record is manipulated by a same operation.
-
10. In a relational data base management system having tables consisting of rows of data, a method of manipulating rows and enforcing referential constraints comprising the steps performed by a computer of:
-
(a) executing an operation which manipulates at least two rows; (b) if the operation includes inserting a row, (b1) inserting such row, and (b2) identifying any referential constraint violation resulting from such insertion; (c) if the operation includes updating a row, (c1) identifying any referential constraint violation resulting from updating any primary key of the row, (c2) updating the row, and (c3) identifying any referential constraint violation resulting from updating any foreign key of the row; (d) if the operation includes the deletion of a row, performing in order the steps of; (d1) deleting the row, and (d2) identifying any referential constraint violation resulting from such deletion; and (e) if any such referential constraint violation is identified, aborting the operation.
-
Specification