×

Hash-based database grouping system and method

  • US 5,511,190 A
  • Filed: 01/20/1995
  • Issued: 04/23/1996
  • Est. Priority Date: 01/20/1995
  • Status: Expired due to Term
First Claim
Patent Images

1. A method for performing a hash grouping operation on a relational database table, said table comprising rows and columns, said columns including at least group column and zero or more data columns, said method comprising the steps of:

  • (1) reading a row of said relational database table, said row comprising a identifier from said at least one group column and zero or more data fields to said zero or more data columns;

    (2) applying a hash function to said group identifier to generate a hashed group value, said hashed group value serving as an index into a memory-resident hash table, said hash table mapping hashed group values into corresponding memory-resident group table entries, each group table entry including group data fields that store for a single group aggregated raw data from said data fields, a group identifier and housekeeping data;

    (3) determining from contents of said hash table whether a matching group table entry exists for a group defined by said group identifier;

    (4) when said matching group table entry exists, aggregating contents of said data fields into corresponding group data fields of said group table entry and updating said housekeeping data;

    (5) when said matching group table entry does not exist and available memory meets predefined memory availability criteria, allocating an additional group table entry, writing into said additional group table entry said group identifier and said data fields, and initializing said housekeeping data.(6) when said matching group table entry does not exist and available memory does not meet said predefined memory availability criteria, applying an overflow procedure to said row wherein contents of said row are used to update an overflow file.(7) repeating steps (1) through (6) until all rows of said table have been read;

    (8) reporting said group table entries;

    (9) when at least one of said rows were written to said overflow file, repeating steps (1) through (8), except in step (1) reading said overflow file rather than said relational database table.

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