Monday 30 January 2012

Null Values


nIt is possible for tuples to have a null value, denoted by null, for some of their attributes
nnull signifies an unknown value or that a value does not exist.
nThe result of any arithmetic expression involving null is null.
nAggregate functions simply ignore null values (as in SQL)
nFor duplicate elimination and grouping, null is treated like any other value, and two nulls are assumed to be  the same (as in SQL)

nComparisons with null values return the special truth value: unknown
lIf false was used instead of unknown, then    not (A < 5)
               would not be equivalent to              
A >= 5
nThree-valued logic using the truth value unknown:
lOR: (unknown or true)         = true,
       (
unknown or false)        = unknown
       (
unknown or unknown) = unknown
lAND:   (true and unknown)         = unknown,  
          
(false and unknown)        = false,
          
(unknown and unknown) = unknown
lNOT(not unknown) = unknown
lIn SQL “P is unknown evaluates to true if predicate P evaluates to unknown
nResult of select  predicate is treated as false if it evaluates to unknown

No comments:

Post a Comment