Patent ID: 7502791

Claim:
A transaction based constraint enforcer for a database system, for enforcing a set of constraints that governs the integrity of information stored in the database system, said enforcer being arranged to delay constraint checks until the end of a transaction by creating a check stack during the course of the transaction and executing entries on the check stack at the end of the transaction, the constraint enforcer comprising a stack maker module, arranged for creating and updating said check stack, said stack maker module being operatively connected to a runtime module in the database system and arranged to receive data from said runtime module, wherein the check stack contains a list of functions that have to be executed at the end of the transaction, said functions originating from Insert, Delete and Update Data Manipulation Language (DML) operations calling up the stack maker module, the Insert DML operation calling up the stack maker module leading to an insert process being performed on the check stack, the insert process involving placing all checks that have to be executed as a result of an occurrence of a table type being inserted and corresponding conceptual rules being identified for the table type being inserted, the Delete DML operation calling up the stack maker module leading to a delete process being performed on the check stack, the delete process involving removing previously inserted entries on the check stack for the occurrence to be deleted and placing all checks that have to be executed as a result of a table type being deleted and corresponding conceptual rules being identified for the table type being deleted, and the Update DML operation calling up the stack maker module leading to said delete process followed by said insert process being performed on the check stack, an enforcer module, arranged to receive check data from the check stack, to process the check data received from the check stack, and to provide resulting data to the runtime module, a conceptual rules module wherein said constraints are stored in the form of rules for prescribing permitted states and transitions that the database can undertake, the conceptual rules module being operatively connected to said stack maker module, said stack maker module being arranged to retrieve constraints from said conceptual rules module, wherein said constraints are constraints executed within the transaction which allow conceptual rules to be broken during the transaction, but allow the database system to be in a consistent state at the beginning and end of the transaction.