Database Reference
In-Depth Information
Note
Unfortunately, data and information are two terms that are still frequently used
interchangeably (and, therefore, erroneously) throughout the database industry.
You'll encounter this error in numerous trade magazines, commercial database
topics,andwebsites,andyou'llevenseethetermsmisusedbyauthorswhoshould
know better.
Null
A null represents a missing or unknown value. You must understand from the outset that a
null does not represent a zero or a text string of one or more blank spaces. The reasons are
quite simple.
• A zero can have a very wide variety of meanings. It can represent the state of an
account balance, the current number of available first-class ticket upgrades, or the
current stock level of a particular product.
• Although a text string of one or more blank spaces is guaranteed to be meaningless
to most of us, it is definitely meaningful to a query language like SQL. A blank
space is a valid character as far as SQL is concerned, and a character string com-
posed of three blank spaces ( ' ' ) is just as legitimate as a character string composed
of three letters ('abc' ). In Figure 3.3 , a blank represents the fact that Washington,
D.C., is not located in any county whatsoever.
Figure 3.3. An example of a table containing null values
• A zero-length string—two consecutive single quotes with no space in between
( '' )—is also an acceptable value to languages such as SQL, and can be meaningful
under certain circumstances. In an EMPLOYEES table, for example, a zero-length
Search WWH ::




Custom Search