×

Method of recursive objects for representing hierarchies in relational database systems

  • US 7,548,935 B2
  • Filed: 05/02/2003
  • Issued: 06/16/2009
  • Est. Priority Date: 05/09/2002
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method of recursive objects for constructing a representation of at least a first two-level hierarchy in a database of a Relational Database Management System (RDBMS) associating a parent record in a parent table in said database with a first plurality of child records in a child table in said database, said parent table containing a plurality of parent records each having a plurality of fields including a uniquely valued parent record identity field and each child record in said plurality of child records having a plurality of fields including a uniquely valued child record identity field, comprising the steps of:

  • (a) creating an aggregate table in said database for inserting aggregate records having a plurality of fields including at least a uniquely valued aggregate record identity field and a parent record identifier field for identifying a parent record;

    (b) creating a link table in said database for inserting link records having a plurality of fields including at least a uniquely valued link record identity field, an aggregate record identifier field for identifying an aggregate record and a child record identifier field for identifying a child record;

    (c) constructing the representation of said first two-level hierarchy by;

    (i) inserting a first aggregate record into said aggregate table with said aggregate record identity field set to a unique first aggregate record identity value and said parent record identifier field set to the value of said parent record identity field in said parent record;

    (ii) following step (c)(i), inserting a plurality of link records into said link table, one link record for each child record in said first plurality of child records with the respective value of said link record identity field set to a unique link record identity value, the respective value of said aggregate record identifier field set to said first aggregate record identity value and the respective value of said child record identifier field set to the value of said child record identity field of the respective child record, wherein the association of said first aggregate record with said parent record and the association of each link record with both said first aggregate record and the respective child record associates said parent record with the respective child record in said first two-level hierarchy, whereby said parent record is associated with said first plurality of child records in said first two-level hierarchy, and(d) retrieving all associations of one parent record and one child record associated in said first two-level hierarchy using a first query over said parent table, said aggregate table, said link table and said child table, said first query restricting retrieval to all associations of one parent record and one child record associated by an aggregate record and an associated link record.

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