Browse Prior Art Database

Alternative Results in Null Field Operations

IP.com Disclosure Number: IPCOM000113194D
Original Publication Date: 1994-Jul-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 43K

Publishing Venue

IBM

Related People

Anderson, MJ: AUTHOR [+3]

Abstract

Extensions to comparison and grouping operations related to database fields which have the null value are described. The extensions simplify the selection predicates specified by the database user.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 73% of the total text.

Alternative Results in Null Field Operations

      Extensions to comparison and grouping operations related to
database fields which have the null value are described.  The
extensions simplify the selection predicates specified by the
database user.

      The data base management system (DBMS) with this invention
supports two operations in addition to what is currently described in
textbooks:

o   Equal or both Null

o   Surface null fields in group results

      Equal or both Null - When the operator Equal or both Null
(*EOBN, say), to code a record selection statement such as 'FLD1
*EOBN FLD2', the DBMS should return records satisfying the more
complex operation of ( (FLD1 *ISNULL) *AND (FLD2 *ISNULL) ) *OR (FLD1
*EQ FLD2)

      Surface null fields in group results - If the DBMS user
indicates he wants Null fields to be surfaced in the Grouping
results, the DBMS needs to return the null value if any of the
subject fields in the group is null.  Assume a file with records

   Dept   Empno   Sales
      500    7811    77
      500    9634    43
      502    2851    22
      502    7863   (null)
      500    5722    45
      502    8144    75
      500    4155    10

The SQL query Select dept,max(sales) from file1 group by dept would
return:

   Dept  Max(Sales)
      500    77
      502    75

The null field in 'sales' for employee 7863 is ignored.

    ...