IP Library Granted Patent US 9,659,051
Granted Patent B2
US 9,659,051 · App. 14/579,436 · Granted May 23, 2017

Enforcing referential integrity for object data documents

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,659,051
App. No.
14/579,436
Granted
May 23, 2017
Kind
B2
Abstract

A metadata framework helps enforce referential integrity in object data documents. In one general aspect, a method includes generating a first data definition language statement, based on a class defined in a metadata framework, that creates a table in a relational database system to store an object data document. The table may include at least one column that corresponds to an identifying attribute in the object data document, at least one column that corresponds to a relationship attribute in the object data document, and a column that stores the object data document. The method may also include generating a second data definition language statement, based on the referential integrity metadata framework, that creates a foreign key constraint on the at least one column that corresponds to the relationship attribute when the relationship is not polymorphic, and issuing the first data definition language statement and the second data definition language statement.

Claims (87)

1. A method comprising:

generating a first data definition language statement, based on a class defined in a referential integrity metadata framework, that creates a table in a relational database system to store an object data document, the table including:

at least one column that corresponds to an identifying attribute in the object data document,

at least one column that corresponds to a relationship attribute in the object data document, and

a column that stores the object data document;

generating a second data definition language statement, based on the referential integrity metadata framework, that creates a foreign key constraint on the at least one column that corresponds to the relationship attribute when the relationship is not polymorphic; and

issuing the first data definition language statement and the second data definition language statement to generate relational database structures that persist object data documents and relationships between object in different object data documents.

2. The method of claim 1 , further comprising:

determining unique data types for the identifying attribute and for the relationship attribute; and

generating extraction functions corresponding to respective unique data types, the extraction function taking a referential integrity attribute and an object data document as parameters and returning a value corresponding to the referential integrity attribute from the object data document, the value having a type corresponding to the data type.

3. The method of claim 1 , further comprising:

generating a stored procedure for the class configured to:

extract a first value corresponding to the identifying attribute from the object data document,

extract a second value corresponding to the relationship attribute from the object data document,

construct a data manipulation language statement using the first value and the second value, and

issue the data manipulation language statement; and

associating an identifier for the stored procedure with the class in the referential integrity metadata framework.

4. The method of claim 1 , wherein the class is a first class and the relationship attribute is an identifying attribute for a second class defined in the referential integrity metadata framework.

5. The method of claim 1 , further comprising:

receiving a request from an application program to insert a new object data document;

extracting a first value corresponding to the identifying attribute from the new object data document;

extracting a second value corresponding to the relationship attribute from the new object data document;

constructing a data manipulation language statement using the first value and the second value that inserts a record into the table; and

issuing the data manipulation language statement, wherein the data manipulation language statement causes the relational database system to check the foreign key constraint prior to successfully inserting the record.

6. The method of claim 5 , further comprising:

determining, using the referential integrity metadata framework, an identifier for an insert stored procedure for the class; and

calling the insert stored procedure, the insert stored procedure performing the extracting, constructing, and issuing.

7. The method of claim 1 , wherein the class is a first class, the table is a first table, and the identifying attribute is a first identifying attribute, and the method further comprises:

determining whether a relationship between the relationship attribute and a second identifying attribute for a second class is polymorphic;

when the relationship is not polymorphic: generating the second data definition language statement and issuing the statement; and

when the relationship is polymorphic, generating a database trigger invoked when a row is inserted into the first table, the row including a new object data document in its entirety and the trigger being configured to:

extract a first value from the new object data document for the relationship attribute,

determine a parent class for the relationship attribute from the object data document,

determine a second table, using the referential integrity metadata framework, for the parent class,

determine if the second table includes a row having a second value in a column corresponding to the second identifying attribute that matches the first value, and

prevent the insertion of the row into the first table when the second table does not include the row having the second value.

8. A system comprising:

at least one hardware processor;

at least one database environment, the database environment supporting triggers and foreign keys;

at least one application program; and

memory storing:

a referential integrity metadata framework that:

identifies classes in a hierarchy of objects,

identifies, for each class, at least one identifying attribute of the class,

identifies, for at least some classes, at least one relationship attribute for the class, and

identifies, for each relationship attribute, a relationship with a corresponding identifying attribute in another class, and

an initialization module configured to use the referential integrity metadata framework to:

generate tables in the database environment based on the referential integrity metadata framework, each table corresponding to a class in the referential integrity metadata framework,

generate primary keys for the tables based on the identifying attributes,

generate referential integrity structures based on the relationship attributes, and

generate at least one class-specific procedure for each class, the procedure for a class extracting a value for each identifying attribute and relationship attribute identified in the referential integrity metadata framework for the class, generate a data manipulation language statement using the extracted values, and issue the data manipulation language statement,

wherein the at least one application program uses the database environment to persist entire object data documents in their entirety and enforce referential integrity in relationships between object data documents.

9. The system of claim 8 , wherein the initialization module is further configured to generate three class-specific procedures for each class, a first procedure being an insert procedure that inserts a row into a table corresponding to the class, a second procedure being an update procedure that updates a row in the table corresponding to the class, and a third procedure being a delete procedure that deletes a row in the table corresponding to the class.

10. The system of claim 8 , wherein the referential integrity metadata framework specifies, for each relationship, whether the relationship is polymorphic or not.

11. The system of claim 10 , wherein the initialization module is further configured to use the referential integrity metadata framework to:

determine whether the relationship between a first relationship attribute and a first identifying attribute is polymorphic;

when the relationship is not polymorphic, generate a foreign key; and

when the relationship is polymorphic, generate at least six database triggers.

12. The system of claim 11 , wherein the at least six database triggers include:

a trigger for the insertion of a row in a table having a column corresponding to the first relationship attribute;

a trigger for the update of the first relationship attribute in the table;

a trigger for the deletion of a row in a table having a column corresponding to the first identifying attribute;

a trigger for update of the column in the table corresponding to the first identifying attribute;

a trigger for the deletion of a row in a table having a column corresponding to a second identifying attribute, the second identifying attribute being related to the first relationship attribute in the referential integrity metadata framework; and

a trigger for update of the column in the table corresponding to the second identifying attribute.

13. The system of claim 8 , wherein the initialization module is further configured to:

determine unique data types of the identifying attributes and relationship attributes; and

generate extraction functions corresponding to respective unique data types, the extraction function taking an attribute and an object data document as parameters and returning a value corresponding to the attribute from the object data document, the value having a type corresponding to the data type.

14. The system of claim 8 , wherein the initialization module is further configured to generate three class-specific procedures for each class, a first procedure being an insert procedure that inserts a row into a table corresponding to the class, a second procedure being an update procedure that updates a row in the table corresponding to the class, a third procedure being a delete procedure that deletes a row in the table corresponding to the class and the referential integrity metadata framework stores an identifier of the first procedure, an identifier of the second procedure, and an identifier of the third procedure in for each class.

15. The system of claim 8 , wherein the memory further stores instructions that, when executed by the at least one processor, cause the system to perform operations comprising:

receiving a request from an application program to insert a new object data document;

determining a class for the new object data document; and

calling the class-specific procedure for the class of the new object data document, the class-specific procedure generating the data manipulation language statement that inserts the new object data document and extracted values as a row in a table in the database environment, the table corresponding to the class in the referential integrity metadata framework.

16. The system of claim 8 , wherein the referential integrity metadata framework specifies, for a first relationship attribute with a many-to-many relationship with a corresponding identifying attribute in another class, an association class, the association class having the identifying attribute for the other class and the first relationship attribute as identifying attributes for the association class and as relationship attributes for the association class.

17. A method comprising:

receiving an object data document and an operation to perform on the object data document from an application program;

determining a class in a referential integrity metadata framework for the object data document, the referential integrity metadata framework specifying at least an identifying attribute and a relationship attribute from the object data document for the class; and

calling a class-specific stored procedure based on the class, the class-specific stored procedure being configured to:

extract a first value for the identifying attribute from the object data document,

extract a second value for the relationship attribute from the object data document,

build a data manipulation language statement using the first value and the second value that performs the operation on a table in a relational database system, the table corresponding to the class in the referential integrity metadata framework and including a column for the identifying attribute, a column for the relationship attribute, and a column that stores the object data document, and

issue the data manipulation language statement for the relational database system to execute, the relational database system enforcing referential integrity constraints based on the relationship attribute.

18. The method of claim 17 , wherein the class-specific stored procedure is generated by an initialization module, the initialization module being configured to:

use the referential integrity metadata framework to automatically create the table in the relational database system, the table including a column for the identifying attribute, a column for the relationship attribute, and a column for the object data document; and

use the referential integrity metadata framework to automatically create referential integrity structures for the table in the relational database system.

19. The method of claim 18 , wherein the referential integrity structures include foreign keys and database triggers.

20. The method of claim 18 , wherein the table lacks columns for attributes in the object data document that are not referential integrity attributes.

Assignments (15)
CHANGE OF NAME Recorded Jan 10, 2025
From: BLADELOGIC, INC.
To: BMC HELIX, INC.
Reel/Frame 069870/0796 →
GRANT OF FIRST LIEN SECURITY INTEREST IN PATENT RIGHTS Recorded Nov 13, 2024
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: GOLDMAN SACHS BANK USA, AS COLLATERAL AGENT
Reel/Frame 069352/0628 →
GRANT OF SECOND LIEN SECURITY INTEREST IN PATENT RIGHTS Recorded Nov 13, 2024
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: GOLDMAN SACHS BANK USA, AS COLLATERAL AGENT
Reel/Frame 069352/0568 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (052854/0139) Recorded Aug 6, 2024
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.
Reel/Frame 068339/0617 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (052844/0646) Recorded Aug 6, 2024
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.
Reel/Frame 068339/0408 →
OMNIBUS ASSIGNMENT OF SECURITY INTERESTS IN PATENT COLLATERAL Recorded Mar 4, 2024
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS RESIGNING COLLATERAL AGENT
To: GOLDMAN SACHS BANK USA, AS SUCCESSOR COLLATERAL AGENT
Reel/Frame 066729/0889 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENTS Recorded Feb 1, 2024
From: ALTER DOMUS (US) LLC
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.
Reel/Frame 066567/0283 →
GRANT OF SECOND LIEN SECURITY INTEREST IN PATENT RIGHTS Recorded Sep 30, 2021
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: ALTER DOMUS (US) LLC
Reel/Frame 057683/0582 →
SECURITY INTEREST Recorded Jun 4, 2020
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 052854/0139 →
SECURITY INTEREST Recorded Jun 4, 2020
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 052844/0646 →
RELEASE OF PATENTS Recorded Oct 5, 2018
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.; BMC ACQUISITION L.L.C.
Reel/Frame 047198/0468 →
SECURITY INTEREST Recorded Oct 2, 2018
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: CREDIT SUISSE, AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 047185/0744 →
SECURITY INTEREST Recorded Jul 27, 2017
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 043351/0231 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME PREVIOUSLY RECORDED AT REEL: 034570 FRAME: 0219. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Mar 16, 2015
From: HUTCHINS, MARK; MILOUSHEFF, ZACK
To: BLADELOGIC, INC.
Reel/Frame 035205/0847 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 22, 2014
From: HUTCHINS, MARK; MILOUSHEFF, ZACK
To: BMC SOFTWARE, INC.
Reel/Frame 034570/0219 →