IP Library Granted Patent US 10,528,548
Granted Patent B2
US 10,528,548 · App. 15/476,677 · Granted Jan 7, 2020

Enforcing referential integrity for object data documents

Inventors: Mark Hutchins (Millbury, MA); Zack Milousheff (San Jose, CA)
Assignee: BladeLogic Inc.
G06F16/2365G06F16/211G06F16/2228G06F16/24565G06F16/289
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 10,528,548
App. No.
15/476,677
Granted
Jan 7, 2020
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 (72)

1. A system comprising:

at least one hardware processor;

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

memory storing a referential integrity structure that includes:

a plurality of classes, each class corresponding to an object data document class;

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

for at least some classes, at least one relationship attribute for the class;

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

at least one procedure for each class, the procedure taking an object data document as a parameter and being configured to:

extract a respective value from the parameter for each identifying attribute of the class,

extract a respective value from the parameter for each relationship attribute for the class, and

issue a data manipulation language statement to the database environment, the data manipulation language statement using the respective values to perform an operation in the database environment on a table row corresponding to the parameter,

wherein the system uses the referential integrity structure to set up and enforce referential integrity in the database environment for the object data document class.

2. The system of claim 1 , wherein using the referential integrity structure includes:

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

determining a class in the referential integrity structure for the object data document; and

calling the at least one procedure for the class using the object data document as the parameter.

3. The system of claim 1 , wherein the referential integrity structure includes, for each class, a procedure corresponding to a delete operation, a procedure corresponding to an insert operation, and a procedure corresponding to an update operation.

4. The system of claim 1 , wherein the at least one procedure for each class is generated from the referential integrity structure.

5. The system of claim 1 , wherein the relationship for each relationship attribute represents a foreign key relationship enforced in the database environment by either a foreign key constraint or database triggers.

6. The system of claim 1 , wherein the procedure corresponds to an insert operation and the data manipulation language statement inserts a row in a table in the database environment for the parameter, the table corresponding to the class of the procedure and the respective value for each identifying attribute being a primary key for the row.

7. The system of claim 1 , wherein using the referential integrity structure to set up referential integrity includes building a table in the database environment corresponding to the class, the table having the identifying attribute as a primary key, having a column to store an object data document, and having the at least one relationship attribute as a foreign key.

8. The system of claim 7 , wherein at least one class has a polymorphic relationship between the identifying attribute and the relationship attribute, and the referential integrity structure is used to build database triggers for the table.

9. A method comprising:

receiving a request from an application program to insert a new object data document, the request identifying a class of the new object data document; and

calling a stored procedure for the class for inserting an object data document with the new object data document as a parameter, the stored procedure being associated with the class in a referential integrity data structure and the stored procedure being configured to:

extract a first value from the new object data document, the first value corresponding to an identifying attribute for the class in the referential integrity data structure,

extract a second value from the new object data document, the second value corresponding to a relationship attribute for the class in the referential integrity data structure, and

issue a data manipulation language statement that inserts a record into a table of a database using the first value and the second value, the record storing the first value in a primary key column of the table, storing the object data document as a large object column of the table, and storing the second value as a foreign key constraint column of the table,

wherein the database supports foreign keys.

10. The method of claim 9 , wherein the referential integrity data structure is from a library that stores a plurality of referential integrity data structures, each of the plurality of referential integrity data structures corresponding to a class.

11. The method of claim 10 , wherein the relationship attribute is identified as an identity attribute of a second referential integrity data structure in the library, the second referential integrity data structure being for a second class.

12. The method of claim 9 , further comprising, before receiving the request:

creating the table based on the referential integrity data structure; and

creating a foreign key constraint based on the referential integrity data structure.

13. The method of claim 9 , wherein the database supports triggers, 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; 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 database trigger being configured to:

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

determine a second table, using the referential integrity data structure, for the parent class,

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

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

14. The method of claim 9 , wherein the referential integrity data structure for the class stores an identifier for the stored procedure.

15. A method comprising:

obtaining, from a referential integrity data structure, an attribute name and a data type for an identifying attribute of a class, the class representing a first table in a database, the identifying attribute representing a primary key of the first table;

obtaining, from the referential integrity data structure, an attribute name and a data type for a relationship attribute of the class, the relationship attribute representing a foreign key of the first table; and

generating an insert stored procedure for the class, the insert stored procedure taking an object data document as a parameter and the insert stored procedure including:

a call to an extract procedure for the data type of the identifying attribute, the call including the attribute name for the identifying attribute and returning a first value variable from the object data document,

a call to an extract procedure for the data type of the relationship attribute, the call including the attribute name for the relationship attribute and returning a second value variable from the object data document, and

a data manipulation language statement that uses the first value variable, the second value variable, and the object data document to insert a record into the first table;

storing the insert stored procedure in a memory; and

associating a name of the insert stored procedure with the referential integrity data structure for the class.

16. The method of claim 15 , wherein an application program invokes the insert stored procedure by calling a generic object function with the class and the object data document as parameters, the generic object function initiating the insert stored procedure responsive to determining the insert stored procedure is associated with the class.

17. The method of claim 15 , further comprising:

generating an update stored procedure for the class, the update stored procedure taking an object data document as a parameter and the update stored procedure including:

a call to the extract procedure for the data type of the identifying attribute, the call including the attribute name for the identifying attribute and returning the first value variable from the object data document,

a call to the extract procedure for the data type of the relationship attribute, the call including the attribute name for the relationship attribute and returning the second value variable from the object data document, and

a data manipulation language statement that uses the first value variable, the second value variable, and the object data document to update a record in the first table;

storing the update stored procedure in the memory; and

associating a name of the update stored procedure with the referential integrity data structure for the class.

18. The method of claim 15 , further comprising:

generating a delete stored procedure for the class, the delete stored procedure taking an object data document as a parameter and the delete stored procedure including:

a call to the extract procedure for the data type of the identifying attribute, the call including the attribute name for the identifying attribute and returning the first value variable from the object data document,

a call to the extract procedure for the data type of the relationship attribute, the call including the attribute name for the relationship attribute and returning the second value variable from the object data document, and

a data manipulation language statement that uses the first value variable, the second value variable, and the object data document to delete a record from the first table;

storing the delete stored procedure in the memory; and

associating a name of the delete stored procedure with the referential integrity data structure for the class.

19. The method of claim 15 , wherein the insert stored procedure is included in a common procedure for the class, and generating the insert stored procedure includes generating the common procedure, wherein the common procedure takes an operation and the object data document as a parameter, the common procedure including the call to the extract procedure for the data type of the identifying attribute and the call to the extract procedure for the data type of the relationship attribute, and the method further includes:

generating a delete stored procedure for the class, the delete stored procedure taking the object data document as a parameter and the delete stored procedure including a data manipulation language statement that uses the first value variable, the second value variable, and the object data document to delete a record from the first table;

generating an update stored procedure for the class, the update stored procedure taking the object data document as a parameter and the update stored procedure including a data manipulation language statement that uses the first value variable, the second value variable, and the object data document to update a record from the first table; and

generating logic that selects one of the update stored procedure, the insert stored procedure, and the delete stored procedure based on the operation.

20. The method of claim 19 , wherein an application program invokes the common procedure by calling a generic object function with the class, the object data document, and an operation as parameters, the generic object function initiating the common procedure responsive to determining the common procedure is associated with the class.

Assignments (14)
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 052844/0646 →
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 →
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 Aug 10, 2017
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 043514/0845 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 15, 2017
From: HUTCHINS, MARK; MILOUSHEFF, ZACK
To: BLADELOGIC, INC.
Reel/Frame 042715/0025 →
Continuity (2)
Continuation 14579436 · Dec 22, 2014
Related Publication 20170206239A1 · Jul 20, 2017