Database Reference
In-Depth Information
database systems support this data type, so check your RDBMS's documentation
for further information.
Many RDBMS programs provide additional data types beyond those specified by the
standard, which are known as extended data types . Examples of extended data types in-
clude MONEY/CURRENCY and SERIAL/ROWID (for unique row identifiers).
I've presented the SQL standard data types because you will encounter them (or variations
thereof) in practically every RDBMS program. I have not provided much detail on these
datatypes,however,becausetheyarenotimplementedconsistentlyacrossallRDBMSpro-
grams; you must consult your RDBMS's documentation to determine which data types the
RDBMS supports and how it implements them.
You can use any of the SQL data types (except Boolean and Interval ) as the setting for the
Data Type element of a given specification. Due to data type implementation inconsisten-
cies, however, I recommend that you use one of the following three general data types as
the setting for this element instead.
1. Alphanumeric: This data type stores any combination of letters, numbers, key-
board characters, or special characters. Keyboard characters include the comma,
dollar sign, exclamation mark, percent sign, and period. Special characters include
the copyright symbol, the trademark symbol, and the symbol for pi.
2. Numeric: This data type stores only whole numbers and real numbers. It will not
accept numbers with leading zeroes (e.g., 0000234) because they are not genuine
numbers.
3. DateTime: This data type stores dates, times, or a combination of both.
These data types are quite suitable for indicating the nature of the data that the field stores,
and they are certainly much easier for users and management to understand. Using general
data types will help you avoid unnecessary confusion, especially when you're reviewing
the specification with users and management.
Note
I use these general data types as the basis for all further data type references and
examples throughout the remainder of the topic. You'll certainly adjust these as
necessary when you implement your database in a particular RDBMS program.
Length
This element specifies the total number of characters that a user can enter for any given
field value. The RDBMS program you use to implement the database will determine the
maximum number of characters you can set for this element. Although you can theoret-
Search WWH ::




Custom Search