The disclosures herein relate generally to content management systems and more particularly to relational databases.
A relational database typically includes several tables with rows and column populated with data such as the CONTACT TABLE of FIG. 1A and the NEWSLETTER TABLE of FIG. 1B. The primary key field of a table typically refers to a column in the table which is unique to that table and which functions as an index for that table. The actual primary key value for each record of the table must contain data unique to that particular record. In
A “foreign key” relationship exists between the CONTACT-NEWSLETTER LINKING TABLE of FIG. 1C and the CONTACT TABLE of
The CONTACT TABLE of FIG. 1A and the NEWSLETTER TABLE of FIG. 1B. are referred to as “parent tables” because they are the source of the primary keys which populate the LINKING TABLE of FIG. 1C. The LINKING TABLE of
In relational databases, foreign keys are widely used in linking tables to establish a special referential relationship between two tables. However, foreign keys have several limitations in a real-world referential relationship between two tables. These limitations include no data definition support for allowing multiple parent tables and no data modification support for allowing multiple parent tables. Moreover, foreign keys do not provide version support.
What is needed is a mechanism and methodology for removing these limitations when using a foreign key to establish a relationship between tables.
Accordingly, in one embodiment a database is disclosed including a plurality of first target tables exhibiting different table types. The database system further includes a source table including a plurality of records, each record having a common super-column including a plurality of sub-columns. At least one of the sub-columns of a particular is record references one of the table types of the plurality of first target tables.
Principal advantages of the embodiment disclosed herein include support for multi-typed target tables, multiple targeting and multiple versioning as explained subsequently.
When a conventional relational database system (RDBS) is created, foreign keys are statically defined. In other words, a particular foreign key in a child table can not point to one parent table under certain conditions and then point to another parent table under other conditions. A particular foreign key can only point to one parent table for the life of that table. In this respect, the conventional foreign key is regarded as being “single-typed”. There is no data definition support for allowing a conventional foreign key to point to multiple parent tables during data definition time. Data definition time is defined to be the time when tables in an RDBS are initially set up, namely the time before such tables are populated with data.
Moreover, during “run time” such a database has no data modification support for foreign keys. Run time is defined to be the time when the already initialized tables are populated with data, record by record. Another problem encountered with the conventional RDBS is that there is no versioning capability. For example, in the contact table of
As seen in
To solve the problems discussed above,
A relational database view function can be used to make it appear to the user that super-column 204 is one column, when in actual practice it is implemented as multiple sub-columns in this particular example. From the user's perspective, super-column 204 will appear as a reference, namely reference 206 as indicated in FIG. 3A. Reference 206 represents any contact and is capable of pointing to any of the contact tables such as GENERAL CONTACT table 212, PERSONAL CONTACT table 214 and DEPARTMENT CONTACT table 216. Stated alternatively, the “any contact” reference 206 associated with source table 202 is capable of pointing to any of target contact tables 212, 214 and 216.
Super-column 204 provides both a multi-type feature and a multi-targeting feature. It is noted that the multi-type feature is similar to the multi-targeting feature. What is important is that reference 206, although single-valued, can point to different types (tables) and different targets (records). At run time RDBS 200 exhibits a multi-type feature because source table 202 and its super-column 204 can point to multiple types of tables, for example one of contact tables 212, 214 and 216. More particularly, “target table name” sub-column 204A of the super-column can point to these different table types as desired by the user. RDBS 200 also exhibits a multi-targeting capability at run time because its super-column 204 can point to multiple targets within tables 212, 214 and 216. For example, in more detail, “target row ID” sub-column 204B can point to such multiple different targets.
This solves two very significant problems associated with foreign keys, namely that they can not point to multiple type tables once the tables are set up and that they can not point to multiple targets once the tables are populated with data. While tables 212, 214 and 216 correspond to different types or species, namely a general contact table, a personal contact table and a department contact table, respectively, they are related in that they are of the same genus, namely they are all contact tables. The usage of “referential integrity (RI) row ID” sub-column, 204C and “target version number” sub-column 204D are discussed later.
A relational database view function can again be used to make it appear to the user that super-column 304 is one column, when in actual practice it is implemented as multiple sub-columns in this particular example. From the user's perspective, super-column 304 will appear as a reference, namely reference 306 as indicated in FIG. 3B. Reference 306 represents any newsletter type and is capable of pointing to any of the newsletter tables such as SHORT NEWSLETTER table 312, MEDIUM NEWSLETER table 314 and LARGE NEWSLETTER table 316. In other words, the “ANY NEWSLETTER ID” reference 306 associated with source table 302 is capable of pointing to any of target newsletter tables 312, 314 and 316. Multi-typing and multi-targeting is thus provided by source table 302 via its “any newsletter” super-column 304. If desired, super-column 304 could also be programmed to point to any of the contact tables such as GENERAL CONTACT table 212, PERSONAL CONTACT table 214 and DEPARTMENT CONTACT table 216. Great flexibility is provided by this RDBS architecture.
From the user's perspective, super column 204 will appear as a reference, namely version-enabled reference 206 at source table 302 as indicated in FIG. 4. Reference 206 represents any contact and is capable of pointing to any of the contact type tables (target tables) such as GENERAL CONTACT table 212, PERSONAL CONTACT table 214 and DEPT. CONTACT table 216. Version-enabled reference 206 also points to the particular version of the contact information desired whether it be the most recent version, the original version or a particular specific version. Multi-typing, multi-targeting and versioning capability are thus provided by source table 302 via its “any contact” super-column 204 operating in the database in conjunction with target contact tables 212, 214 and 216.
In more detail, it is noted that a reference such as version-enabled reference 206 uniquely identifies a referential relationship between a source row in source table 302 and a target row component in the target tables 212, 214 and 216. A source row may include zero or more references. A reference may be single-valued (i.e. referencing one target row) and is free to point to any row of any target table. A reference includes on-insert, on update, and on delete referential integrity on source rows which is maintained by the database system. Moreover, a reference has on-delete referential integrity (restrict, no action, set null, or cascade) on target rows which is also maintained by the database system. A reference also exhibits versioning referential integrity (referring to a specific or most current version) on both source and target rows which is again maintained by the database system. This referential integrity is specified during run time.
As mentioned earlier, super-column 304 is similar to super-column 204 and can be populated to point to multiple types and targets in target tables 212, 214, 216, 312, 314 and 316. Each of these tables includes a version field. Target tables 312, 314 and 316 include version fields 322, 324 and 326. In actual practice source tables may include other columns and rows in addition to super-columns 204 and 304 as desired by the user or others. For example,
In path 630, instead of pointing directly from source row 520 to target row 610, source row 520 points to RI row 640 of the RI table for the purpose of maintaining referential integrity. However, direct path 620 provides high execution speed while RI path 630 maintains referential integrity. The path through RI row 640 and its RI table is transparent to the user.
To maintain referential integrity, target row 610 is synchronized with RI row 640 of the RI table. Whenever there is a delete in the target table, there is a corresponding delete in the RI table. Once this synchronization between the target table and RI table is carried out for a particular row, further synchronization between the RI table and the source table is conducted. From the source table to the RI table, a foreign key-like relationship is defined from the RI ROW ID (one column of the super-column) to the RI column (a primary key) in the RI table. However, from the RI table to the target table, there is no foreign key relationship. (It will be recalled that RI ROW ID is one sub-column of super column 204, namely “referential integrity (RI) row ID” sub-column 204C, as shown in FIG. 3A.
Even though there is no foreign key relationship between the target table and the RI table (e.g. between target row 610 and RI row 640 in FIG. 6), there is a target trigger 650 monitoring changes made to the target table. When target trigger 650 detects that a delete or other change has been made to the target table, it instructs the RI table to make the same delete or other change in the corresponding record in the RI table. Changes made to the RI table are cascaded back to the source table of which source row 520 is a member. It is noted that target trigger 650 includes trigger logic which is dynamically attached to the target table as needed to synchronize deletions and changes between the target and RI tables. These deletions and changes include version deletions and version changes.
A source trigger 660 is attached to source table 510 which includes source row 510 as shown in FIG. 6. Source trigger 660 takes care of forward deleting the corresponding RI row when a source row is deleted. To summarize trigger operation, as described above, on delete and update triggers are attached to source and target tables for maintaining global referential integrity. Source table triggers are statically created during source table generation whereas target triggers are dynamically created.
The disclosed content management system can be stored on virtually any computer-readable storage media, such as CD, DVD and other magnetic and optical media in either compressed or non-compressed form. Of course, it can also be stored on a server computer system or other information handling system.
The principal advantages of these embodiments are the providing of a relational database system and methodology which permits multi-typing, multi-targeting and multi-versioning while conserving valuable memory space in the host server system.
Although illustrative embodiments have been shown and described, a wide range of modification, change and substitution is contemplated in the foregoing disclosure and in some instances, some features of an embodiment may be employed without a corresponding use of other features. Accordingly, it is appropriate that the appended claims be construed broadly and in a manner consistent with the scope of the embodiments disclosed herein.
Number | Name | Date | Kind |
---|---|---|---|
4751740 | Wright | Jun 1988 | A |
4969091 | Muller | Nov 1990 | A |
5615337 | Zimowski et al. | Mar 1997 | A |
5644768 | Periwal et al. | Jul 1997 | A |
5680557 | Karamchetty | Oct 1997 | A |
5701400 | Amado | Dec 1997 | A |
5742810 | Ng et al. | Apr 1998 | A |
5742813 | Kavanagh et al. | Apr 1998 | A |
5774719 | Bowen | Jun 1998 | A |
5778398 | Nagashima et al. | Jul 1998 | A |
5799310 | Anderson et al. | Aug 1998 | A |
5819252 | Benson et al. | Oct 1998 | A |
5862378 | Wang et al. | Jan 1999 | A |
5875332 | Wang et al. | Feb 1999 | A |
5892902 | Clark | Apr 1999 | A |
5940616 | Wang | Aug 1999 | A |
5953525 | Glaser et al. | Sep 1999 | A |
5956036 | Glaser et al. | Sep 1999 | A |
6012067 | Sarkar | Jan 2000 | A |
6016394 | Walker | Jan 2000 | A |
6016497 | Suver | Jan 2000 | A |
6047291 | Anderson et al. | Apr 2000 | A |
6052693 | Smith et al. | Apr 2000 | A |
6055637 | Hudson et al. | Apr 2000 | A |
6063133 | Li et al. | May 2000 | A |
6065117 | White | May 2000 | A |
6067414 | Wang et al. | May 2000 | A |
6088524 | Levy et al. | Jul 2000 | A |
6104393 | Santos-Gomez | Aug 2000 | A |
6128621 | Weisz | Oct 2000 | A |
6148342 | Ho | Nov 2000 | A |
6161182 | Nadooshan | Dec 2000 | A |
6167405 | Rosensteel, Jr. et al. | Dec 2000 | A |
6173400 | Perlman et al. | Jan 2001 | B1 |
6219826 | De Pauw et al. | Apr 2001 | B1 |
6233586 | Chang et al. | May 2001 | B1 |
6263313 | Milsted et al. | Jul 2001 | B1 |
6263342 | Chang et al. | Jul 2001 | B1 |
6272488 | Chang et al. | Aug 2001 | B1 |
6279008 | Tung Ng et al. | Aug 2001 | B1 |
6279111 | Jensenworth et al. | Aug 2001 | B1 |
6282649 | Lambert et al. | Aug 2001 | B1 |
6289344 | Braia et al. | Sep 2001 | B1 |
6289458 | Garg et al. | Sep 2001 | B1 |
6292936 | Wang | Sep 2001 | B1 |
6308274 | Swift | Oct 2001 | B1 |
6314449 | Gallagher et al. | Nov 2001 | B1 |
6327629 | Wang et al. | Dec 2001 | B1 |
6338056 | Dessloch et al. | Jan 2002 | B1 |
6339777 | Attaluri et al. | Jan 2002 | B1 |
6343286 | Lee et al. | Jan 2002 | B1 |
6550057 | Bowman-Amuah | Apr 2003 | B1 |
6601234 | Bowman-Amuah | Jul 2003 | B1 |
6636845 | Chau et al. | Oct 2003 | B2 |
20010002486 | Kocher et al. | May 2001 | A1 |
20010008015 | Vu et al. | Jul 2001 | A1 |
20010019614 | Madoukh | Sep 2001 | A1 |
Number | Date | Country |
---|---|---|
WO 9922362 | May 1999 | WO |
Number | Date | Country | |
---|---|---|---|
20030200219 A1 | Oct 2003 | US |