Compare and Contrast Fundamental Data Types and their Characteristics. Flashcards

1
Q

Char

A

Data type stores character data in a fixed-length field. Data can be a string of single-byte or multibyte letters, numbers, and other characters that are supported by the code set of your database locale. For example, if you define a CHAR column as CHAR(10), the column has a fixed length of 10 bytes, not 10 characters. If you want to store multibyte characters in a CHAR column, keep in mind that the total number of characters you can store in the column might be less than the total number of bytes you can store in the column. Make sure to define the byte size of the CHAR column so that it can hold enough characters for your purposes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Strings

A

Traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after creation). A string is generally considered a data type and is often implemented as an array data structure of bytes (or words) that stores a sequence of elements, typically characters, using some character encoding. Example: “abc123”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Intagers

A

Stores whole numbers that range from -2,147,483,647 to 2,147,483,647 for 9 or 10 digits of precision. The number 2,147,483,648 is a reserved value and cannot be used. The INTEGER value is stored as a signed binary integer and is typically used to store counts, quantities, and so on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Floats

A

Stores double-precision floating-point numbers with up to 17 significant digits. FLOAT corresponds to IEEE 4-byte floating-point, and to the double data type in C. The range of values for the FLOAT data type is the same as the range of the C double data type on your computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Boolean

A

A data type with two possible values: true (1) or false (0). The two values help represent truth conditions found in logic control structures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly