×

Automatic enforcement of relationships in a database schema

  • US 8,458,124 B2
  • Filed: 12/09/2011
  • Issued: 06/04/2013
  • Est. Priority Date: 07/27/2004
  • Status: Active Grant
First Claim
Patent Images

1. A method of enforcing a database relationship, comprising:

  • specifying using a markup language within a database schema a host structure and a reference type for the host structure that indicates an association between the host structure and a parent structure to which the host structure refers and specifies the relationship between the host structure and the parent structure, wherein the reference type is specified using the markup language and selected from at least a first reference type, a second reference type, and a third reference type;

    automatically generating code that enforces the relationship between the host structure and the parent structure based on the reference type specified in the database schema;

    enforcing the relationship using the automatically generated code, including determining whether the reference type for the host structure is of the first reference type, the second reference type, or the third reference type;

    in the event that the reference type for the host structure is of the first reference type and a request to delete a host in a database for which the database schema has been defined is received,disallowing deletion of the host if the host refers to a child instance, andallowing deletion of the host if the host does not refer to a child instance;

    in the event that the reference type for the host structure is of the second reference type and a request to delete a host in a database for which the database schema has been defined is received, deleting an instance referring to the host; and

    in the event that the reference type for the host structure is of the third reference type and a request to delete a host in a database for which the database schema has been defined is received, nullifying a reference of an instance referring to the host.

View all claims
  • 6 Assignments
Timeline View
Assignment View
    ×
    ×