Automated database manager
AssigneeInternational Business Machines Corporation
InventorsMichael Bender, Wayne M. Delia
Life of this patent
Estimating the term…
Abstract
Automated database managers identify each of a plurality of different constraints that are each individually active for a data operation on a data value of a table data field of a relational database for a data operation. A database manager processor selects an untested one of the plurality of constraints as a selected constraint, and tests a field data value of the table data field for a defined condition of the selected constraint. In response to the test of the field data value meeting the defined condition of the selected constraint, the processor performs the data operation on the data value of the table data field, without testing any other untested ones of the plurality of different constraints.
Claims17
A computer-implemented method for an automated database manager, the method comprising executing on a computer processor the steps of:
- identifying, by a processor, each of a plurality of different constraints that are each individually active for a data operation on a data value of a table data field of a relational database for a data operation;
- querying a constraint system table to identify a target table name and an affected column name for the data operation;
- determining whether a first constraint name that is active for the field data values of the target table name and the affected column name for the data operation has a non-null hybrid constraint name as a value in a hybrid reference system table field;
- in response to determining that the active first constraint name has the non-null hybrid constraint name as the value in a hybrid reference system table field, identifying the active first constraint name as a hybrid constant name, and selecting a plurality of constraints that are each defined within a definition statement of the hybrid constraint name and stored as a constraint definition statement in another reference system table field;
- selecting an untested one of the plurality of constraints as a selected constraint;
- testing a field data value of the table data field for a defined condition of the selected constraint;
- and
- in response to the testing of the field data value meeting the defined condition of the selected constraint, performing the data operation on the data value of the table data field without testing any other untested ones of the plurality of different constraints.
A system, comprising:
- a processor;
- a computer readable memory in circuit communication with the processor;
- and
- a computer readable storage medium in circuit communication with the processor;
- wherein the processor executes program instructions stored on the computer-readable storage medium via the computer readable memory and thereby:
- identifies each of a plurality of different constraints that are each individually active for a data operation on a data value of a table data field of a relational database for a data operation;
- queries a constraint system table to identify a target table name and an affected column name for the data operation;
- determines whether a first constraint name that is active for the field data values of the target table name and the affected column name for the data operation has a non-null hybrid constraint name as a value in a hybrid reference system table field;
- in response to determining that the active first constraint name has the non-null hybrid constraint name as the value in a hybrid reference system table field, identifies the active first constraint name as a hybrid constant name, and selects a plurality of constraints that are each defined within a definition statement of the hybrid constraint name and stored as a constraint definition statement in another reference system table field;
- selects an untested one of the plurality of constraints as a selected constraint;
- tests a field data value of the table data field for a defined condition of the selected constraint;
- and
- in response to the test of the field data value meeting the defined condition of the selected constraint, performs the data operation on the data value of the table data field, without testing any other untested ones of the plurality of different constraints.
A computer program product for an automated database manager, the computer program product comprising:
- a computer readable storage medium having computer readable program code embodied therewith, wherein the computer readable storage medium is not a transitory signal per se, the computer readable program code comprising instructions for execution by a processor that cause the processor to:
- identify each of a plurality of different constraints that are each individually active for a data operation on a data value of a table data field of a relational database for a data operation;
- query a constraint system table to identify a target table name and an affected column name for the data operation;
- determine whether a first constraint name that is active for the field data values of the target table name and the affected column name for the data operation has a non-null hybrid constraint name as a value in a hybrid reference system table field;
- in response to determining that the active first constraint name has the non-null hybrid constraint name as the value in a hybrid reference system table field, identify the active first constraint name as a hybrid constant name, and select a plurality of constraints that are each defined within a definition statement of the hybrid constraint name and stored as a constraint definition statement in another reference system table field;
- select an untested one of the plurality of constraints as a selected constraint;
- test a field data value of the table data field for a defined condition of the selected constraint;
- and
- in response to the test of the field data value meeting the defined condition of the selected constraint, perform the data operation on the data value of the table data field, without testing any other untested ones of the plurality of different constraints.
Dependencies are inferred from the claim text.