Automatic enforcement or relationships in a database schema
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 and a second 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;
(1) determining whether the reference type for the host structure is of the first reference type or the second reference type;
(2) in the event the reference type for the host structure is of the first reference type, ensuring that an instance of the parent structure cannot be deleted when an instance of the host structure exists; and
(3) in the event the reference type for the host structure is of the second reference type;
(i) ensuring that when an instance of the parent structure does not exist, an instance of the host structure cannot exist;
(ii) receiving a request to insert a host into a database for which the database schema has been defined, wherein the host is an instance of the child structure and the host refers to an instance of a parent structure;
(iii) determining whether the instance of the parent structure exists in the database, wherein the instance of the parent structure is a Domain Name System (DNS) zone of a network; and
(iv) in the event that the instance of the parent structure does not exist in the database, disallowing insertion of the instance of the child structure into the database, wherein the insert of the host is disallowed if the DNS zone does not exist.
7 Assignments
0 Petitions
Accused Products
Abstract
A technique for enforcing a database relationship is disclosed. The technique includes specifying within a database schema a reference type that associates two structures and specifies the relationship between the two structures, and automatically generating code that checks the relationship between the two structures based on the specified reference in the database schema.
33 Citations
45 Claims
-
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 and a second 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; (1) determining whether the reference type for the host structure is of the first reference type or the second reference type; (2) in the event the reference type for the host structure is of the first reference type, ensuring that an instance of the parent structure cannot be deleted when an instance of the host structure exists; and (3) in the event the reference type for the host structure is of the second reference type; (i) ensuring that when an instance of the parent structure does not exist, an instance of the host structure cannot exist; (ii) receiving a request to insert a host into a database for which the database schema has been defined, wherein the host is an instance of the child structure and the host refers to an instance of a parent structure; (iii) determining whether the instance of the parent structure exists in the database, wherein the instance of the parent structure is a Domain Name System (DNS) zone of a network; and (iv) in the event that the instance of the parent structure does not exist in the database, disallowing insertion of the instance of the child structure into the database, wherein the insert of the host is disallowed if the DNS zone does not exist. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 45)
-
-
15. A system for enforcing a database relationship, comprising:
-
a processor configured to; specify 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 and a second reference type; automatically generate code that enforces the relationship between the host structure and the parent structure based on the reference type specified in the database schema; enforce the relationship using the automatically generated code, including; (1) determining whether the reference type for the host structure is of the first reference type or the second reference type; (2) in the event the reference type for the host structure is of the first reference type, ensuring that an instance of the parent structure cannot be deleted when an instance of the host structure exists; and (3) in the event the reference type for the host structure is of the second reference type; (i) ensuring that when an instance of the parent structure does not exist, an instance of the host structure cannot exist; (ii) receiving a request to insert a host into a database for which the database schema has been defined, wherein the host is an instance of the child structure and the host refers to an instance of a parent structure; (iii) determining whether the instance of the parent structure exists in the database, wherein the instance of the parent structure is a Domain Name System (DNS) zone of a network; and (iv) in the event that the instance of the parent structure does not exist in the database, disallowing insertion of the instance of the child structure into the database, wherein the insert of the host is disallowed if the DNS zone does not exist; a memory that is coupled with the processor, wherein the memory provides the processor with instructions. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 44)
-
-
29. A computer program product for enforcing a database relationship, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions executable to:
-
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 and a second 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; (1) determining whether the reference type for the host structure is of the first reference type or the second reference type; (2) in the event the reference type for the host structure is of the first reference type, ensuring that an instance of the parent structure cannot be deleted when an instance of the host structure exists; and (3) in the event the reference type for the host structure is of the second reference type; (i) ensuring that when an instance of the parent structure does not exist, an instance of the host structure cannot exist; (ii) receiving a request to insert a host into a database for which the database schema has been defined, wherein the host is an instance of the child structure and the host refers to an instance of a parent structure; (iii) determining whether the instance of the parent structure exists in the database, wherein the instance of the parent structure is a Domain Name System (DNS) zone of a network; and (iv) in the event that the instance of the parent structure does not exist in the database, disallowing insertion of the instance of the child structure into the database, wherein the insert of the host is disallowed if the DNS zone does not exist. - View Dependent Claims (30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43)
-
Specification