Methods for improved referential integrity in a relational database management system
First Claim
1. In a computer system, a method for maintaining referential integrity among a plurality of data tables stored in a relational database system, the method comprising:
- (a) receiving from a user a request specifying a desired referential integrity link between two data tables, said request designating a master table having at least one field whose values are to serve as a reference, said at least one field serving as a primary key for said master table, and said request designating a detail table having at least one field whose values are required to match reference values in the master table, said at least one field of the detail table serving as a foreign key linking said detail table to the primary key of said master table;
(b) associating with said detail table a foreign key descriptor, said foreign key descriptor storing information specifying which index of the detail table supports said foreign key, which table is said master table for the referential integrity link, and which fields of the detail table contribute to said foreign key, said foreign key descriptor being stored together with said detail table so that a transfer of said detail table to a remote location includes transfer of said foreign key descriptor;
(c) associating with said master table an embedded key descriptor, said embedded key descriptor storing information specifying which fields of said master table contribute to said primary key and further specifying said detail table for the referential integrity link, said embedded key descriptor being stored together with said master table so that a transfer of said master table to a remote location includes transfer of said embedded key descriptor; and
(d) storing with said embedded key descriptor a detail table descriptor, said detail table descriptor storing information specifying said detail table, which index supports said foreign key, and which at least one field of said detail table contributes to said foreign key.
8 Assignments
0 Petitions
Accused Products
Abstract
A system of the present invention includes a PC-based relational database management system (PC RDBMS) with data integrity facilities. Methods are described for maintaining referential integrity between data tables which may be freely moved to various remote workstations--ones which do not have ready access to a centrally-maintained data dictionary. The system provides each table with descriptors for tracking referential integrity links or relationships among various tables, regardless of a particular situs where a table resides. A preferred interface is also described for permitting end-users to easily define referential integrity links between data tables.
-
Citations
32 Claims
-
1. In a computer system, a method for maintaining referential integrity among a plurality of data tables stored in a relational database system, the method comprising:
-
(a) receiving from a user a request specifying a desired referential integrity link between two data tables, said request designating a master table having at least one field whose values are to serve as a reference, said at least one field serving as a primary key for said master table, and said request designating a detail table having at least one field whose values are required to match reference values in the master table, said at least one field of the detail table serving as a foreign key linking said detail table to the primary key of said master table; (b) associating with said detail table a foreign key descriptor, said foreign key descriptor storing information specifying which index of the detail table supports said foreign key, which table is said master table for the referential integrity link, and which fields of the detail table contribute to said foreign key, said foreign key descriptor being stored together with said detail table so that a transfer of said detail table to a remote location includes transfer of said foreign key descriptor; (c) associating with said master table an embedded key descriptor, said embedded key descriptor storing information specifying which fields of said master table contribute to said primary key and further specifying said detail table for the referential integrity link, said embedded key descriptor being stored together with said master table so that a transfer of said master table to a remote location includes transfer of said embedded key descriptor; and (d) storing with said embedded key descriptor a detail table descriptor, said detail table descriptor storing information specifying said detail table, which index supports said foreign key, and which at least one field of said detail table contributes to said foreign key. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. In an information processing system, a method for maintaining referential integrity of data stored in database tables, the method comprising:
-
(a) receiving from a user a request for a desired referential integrity constraint between at least one corresponding field of first and second database tables, said first table being a master table where its at least one corresponding field forms a primary key, and said second table being a detail table where its at least one corresponding field forms a foreign key matching said primary key; (b) storing with the detail table a foreign key descriptor sufficient to characterize said foreign key and said primary key, said information including information identifying said at least one field of the detail table forming said foreign key and identifying said at least one field of the master table forming said primary key, said foreign key descriptor being stored together with said detail table so that a transfer of said detail table to a remote location includes transfer of said foreign key descriptor; (c) storing with the master table an embedded key descriptor sufficient to characterize the detail table which the master table supports, said information including information identifying said at least one field of the detail table forming said foreign key and identifying said at least one field of the master table forming said primary key, said embedded key descriptor being stored together with said master table so that a transfer of said master table to a remote location includes transfer of said embedded key descriptor; and (d) for each request received to modify or delete a record in the detail table, determining whether the request to modify would violate corresponding values stored in the master table, by examining said foreign key and embedded key descriptors. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
-
29. A data processing system comprising:
-
means for storing a plurality of database tables, each table storing records comprising a plurality of fields; means for requesting a data integrity constraint between corresponding fields of first and second tables, said first table having at least one field whose values must match values stored in at least one corresponding field of said second table; means for storing with said first table a first descriptor specifying said at least one field of the first table whose values must match values stored in at least one corresponding field of said second table and further specifying said at least one corresponding field of said second table, so that a transfer of said first table to another location includes transfer of said first descriptor; means for storing with said second table a second descriptor specifying said at least one field of the first table whose values must match values stored in at least one corresponding field of said second table and further specifying said at least one corresponding field of said second table, so that a transfer of said second table to another location includes transfer of said second descriptor; and means, responsive to said first and second descriptors, for determining whether a database operation modifying either said first table or said second table may be performed without violating said data integrity constraint. - View Dependent Claims (30, 31, 32)
-
Specification