Database Reference
In-Depth Information
For now, keep in mind that Unicode may be required based on the char-
acter data you are storing.
Numeric
Numeric data is any data that needs to be stored as numerals. You can per-
form calculations on all the numeric data types. The general types of nu-
meric data are integer, decimal, money, float, and real.
Integer data is stored as any whole number. It can store positive and
negative numbers and generally comes in different sizes to accommodate
the values needed. Decimals are numbers stored to the scale and preci-
sion specified. Scale in this case refers to the total number of numerals
that are stored in the field, and precision refers to the number of those
numerals stored to the right of the decimal point. Money is for the stor-
age of currency and is accurate to different degrees based on the RDBMS
being used. Float is an approximate number data type for use with floating-
point data values. This is generally stored in scientific notation, and a des-
ignator can be specified with this data type that describes the number of
bits that are used to store the number. Real is nearly identical to float;
however, float can hold larger values.
As with the alphanumeric data types, the specific information regard-
ing the physical storage of these data types is covered in Chapter 3.
Boolean
Boolean data types are data types that evaluate to TRUE, FALSE, or
NULL. This is a logic-based data type; although the data being stored may
be Boolean, the actual data type is bit . A bit data type stores a 1 or a 0 or
NULL. This translates to true, false, and nothing, respectively. Boolean
data types are used for logic-based evaluation of data and are often used as
switches or flags, such as a designator to describe whether a vehicle is in
or out of service.
BLOB and CLOB
Not all data stored in a database is in a human-readable format. For ex-
ample, a database that houses product information for an online retailer
not only holds the descriptive data about each product but may also store
pictures of those products. The binary data that makes up the information
about the image is not something that can be read as character data, but it
Search WWH ::




Custom Search