Chapter 8 Study Questions Flashcards

1
Q

A column’s ____ ____ specifies the kind of information the column is intended to store; and it determines the operations that can be performed on the column.

A

data type

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

_________ ____ _____ are intended for storing a string of one or more characters, which can include letters, numbers, symbols, or special characters.

A

Character data types

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

The _______ ____ _____ are intended for storing numbers that can be used for mathematical calculations.

A

numeric data types

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

________ are numbers that do not have a decimal point.

A

Integers

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

____ _______ are numbers that have a decimal point.

A

Real numbers

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

____ ___ ____ ____ _____ are intended for storing dates, times or both dates and times.

A

Date and time data types

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

_____ ______ ____ _____ (___) are useful for storing images, sound, video, and large amounts of character data.

A

Large Object data types (LOB)

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

MySQL provides _______ ____ _____ that are useful for storing geometric and geographical values such as GPS data.

A

spatial data types

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

Use the CHAR type to store _____-______ ______. Data of this type always occupy the same number of bytes.

A

fixed-length strings

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

Use the _______ type to store variable-length strings. Data of this type occupies only the number of bytes needed to store the string in an extra byte to store the length of the string.

A

VARCHAR

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

If the ________ attribute for an integer is set, it prevents negative values from being stored in a column. And the range of acceptable positive values is doubled.

A

UNSIGNED

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

If the ________ attribute for an integer is set, the UNSIGNED attribute is automatically set, and the integer is displayed with zeros padded from the left up to the maximum display size.

A

ZEROFILL

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

It is common programming practice to use ___ as an abbreviation for INTEGER.

A

INT

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

The ____ ___ _______ types are synonyms for TINYINT(1). You can use these types to store 0 or FALSE for false values, and 1 or TRUE for true values.

A

BOOL and BOOLEAN

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

____ _______ can include digits to the right of the decimal point.

A

Real numbers

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

The __________ of a real number indicates the total number of digits that can be stored, and the _____ indicates the number of digits that can be stored to the right of the decimal point.

A

precision, scale

17
Q

The DECIMAL type is considered an _____ ________ ____ because its precision is exact.

A

exact numeric type

18
Q

The DOUBLE and FLOAT types store ________-_____ _______ which have a limited number of significant digits. These types are considered ___________ _______ ____ _____ because they do not represent a value exactly.

A

floating-point numbers, approximate numeric data types

19
Q

If the ________ attribute for a real number is set, the number is displayed with zeros padded from the left, and the UNSIGNED attribute is automatically set.

A

ZEROFILL

20
Q

The ____ type can be used to store a date without a time.

A

DATE

21
Q

Use the ________ type, rather than TIMESTAMP, to store both a date and a time (and also avoid the year 2038 problem)

A

DATETIME

22
Q

To store a year without any other temporal data, use the ____ type.

A

YEAR

23
Q

The ____ type, considered a character type, can store exactly one value; where as the ___ type can take on zero, one, or up to 64 different values. Values for these types are defined when the table is created.

A

ENUM, SET

24
Q

The _________ types store strings of binary data (255 to 4GB in length)

A

BLOB

25
Q

____ types store strings of characters up to 65KB in length and are sometimes referred to as “character large object types”.

A

TEXT

26
Q

When SQL automatically converts one data type to another, it is known as _________ __________. For example, when adding or subtracting an integer to a DATE value.

A

implicit conversion

27
Q

To control how a conversion is performed, code an _________ ___________ using the CAST and CONVERT functions

A

explicit conversion