You are on page 1of 4

INFORMATION SYSTEM CCE104L

Please read the information below for additional information about Relational Database Components.

RELATIONAL DATABASE COMPONENTS

Basic Data Types

 Fixed-length character
This is a character-string data type with defined number of characters that cannot be changed. This
can store up to 255 characters.

 Variable-length character
This data type is of a specified number of characters that can be changed.
o Variable-length fields with an explicit length
Variable-length fields with an explicit length can be repeatable. These fields are always
located after the last fixed-length field and can only be followed by other variable-length
fields with an explicit length.
o Variable-length fields with an implicit length
Variable-length fields with an implicit length require that the total structure size is available
in another structure field. The structure size field must be a type of short, int, or their
unsigned counterparts. It must be referenced by the totalSize attribute of the Object
element in the data model descriptor.

 Long text
This data type is used for larger amount of text because it holds a large size of string.
 Integer
This data type includes integer numbers of various sizes (INTEGER or INT, and SMALLINT) and
floating-point (real) numbers of various precision (FLOAT or REAL, and DOUBLE PRECISION).
Formatted numbers can be declared by using DECIMAL(i,j)—or DEC(i,j) or NUMERIC(i,j)—where i,
the precision, is the total number of decimal digits and j, the scale, is the number of digits after the
decimal point. The default for scale is zero, and the default for precision is implementation-defined.
It is a whole number that has no fractional part.

 Decimal
This data type represents exact numeric and non-repeating fractions without rounding off and can
handle large digits such as financial calculations.

 Currency
This data type handles monetary values and precise financial calculations.
INFORMATION SYSTEM CCE104L

03 Handout 1
Page 1 of 2
INFORMATION SYSTEM CCE104L

 Date/time
This data type is used to handle date combined with a time of a day with fractional seconds. Date
components are year, month, and day; Time components are hour, minute, and second. Only valid
dates and times are allowed such as month ranges from 1 to 12, and date must be from 1 to 31 that
corresponds for a specific month.

 Boolean
This data type handles the TRUE or FALSE values. It is used to determine whether a condition is true
or not, yes or no, and on or off, to answer questions with exactly two options.

References:
Elmasri, R., Navathe, S. (2011). Fundamentals of Database Systems 6th ed. USA: Addison-Wesley
Oppel, A. (2009). Databases: A Beginner’s Guide. McGraw-Hill Companies
Powell, G. Beginning Database Design. Wiley Publishing

Retrieved from http://www-01.ibm.com/support/knowledgecenter/SSB23S_1.1.0.9/com.ibm.ztpf-


ztpfdf.doc_put.09/gtpw2/cdatamodel_varlength.html
INFORMATION SYSTEM CCE104L
Retrieved from http://www.w3schools.com/sql/sql_datatypes_general.asp

03 Handout 1
Page 2 of 2

You might also like