Java Reference
In-Depth Information
Codd's Physical Data Independence Rule (Rule 8), which states that data must be
physically independent of application programs, is also clearly implemented through
the tabular structure of an RDBMS. All application programs interface with the tables
at a logical level, independent of the structure of both the table and of the underlying
storage mechanisms.
Nulls
In a practical database, situations arise in which you either don't know the value of a
data element or don't have an applicable value. For example, in Table 1-2 , what if you
don't know the value of a particular data item? What if, for example, Francis Xavier
Corleone changed his name to just plain Francis Corleone, with no middle initial?
Does that blow away the whole table? The answer lies in the concept of systematic
nulls.
Codd's Systematic Nulls Rule (Rule 3) states that the RDBMS is required to support a
representation of missing and inapplicable information that is systematic, distinct from
all regular values, and independent of data type. In other words, a relational database
must allow the user to insert a NULL when the value for a field is unknown or not
applicable. This results in something like the example in Table 1-3 .
Table 1-3: Inserting NULLs into a Table
ID
FIRST_NAME
MI
LAST_NAME
STREET
CITY
ST
ZIP
103
Francis
<NULL>
Corleone
17 Main
New
York
NY
10005
Clearly, the requirement to support NULLS means that the RDBMS must be able to
handle NULL values in the course of normal operations in a systematic way. This is
managed through the ability to insert, retrieve, and test for NULLS and to specify
NULLS as valid or invalid column va lues.
Primary Keys
Codd's Guaranteed Access Rule (Rule 2) states that every data element must be
logically accessible through the use of a combination of its primary key name, primary
key value, table name, and column name. This is guaranteed by designating a
primary key that contains a unique value for each row in the table. Each table can
have only one primary key, which can be any column or group of columns in the table
having a unique value for each row.
It is worth noting that, while most relational database management systems will let
you create a table without a primary key, the usability of the table will be
compromised if you fail to assign a primary key. The reason for this is that one of the
strengths of a relational database is the ability to link tables to each other. These links
 
Search WWH ::




Custom Search