1.5 Data Types Flashcards

1
Q

data type

A

A data type is a named set of values from which column values are drawn.

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

Integer

A

INT
Integer data types represent positive and negative integers.

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

Decimal

A

DECIMAL(M,D)
FLOAT (4 Bytes)
DOUBLE (8 Bytes)

Decimal data types represent numbers with fractional values.

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

Character

A

CHAR(N) - fixed length
VARCHAR(N) - variable lengh
TEXT

Character data types represent textual characters.

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

Date and time

A

DATE
TIME
DATETIME

Date and time data types represent date, time, or both. Some date and time data types include a time zone or specify a time interval.

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

Binary

A

Binary data types store data exactly as the data appears in memory or computer files, bit for bit.

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

Spatial

A

Spatial data types store geometric information, such as lines, polygons, and map coordinates.

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

Document

A

Document data types contain textual data in a structured format such as XML or JSON.

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

signed

A

includes a - sign
A signed number may be negative.

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

unsigned

A

An uNsigned number canNot be Negative.

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

enum

A

Each value in the ENUM list is stored as a number internally, but it’s displayed as text. This is efficient for small, predefined lists, making it ideal for cases like days of the week, months, or product statuses.

If an attempt is made to insert a value outside of this set, the database will reject it.

CREATE TABLE Colors (
Color ENUM(‘Red’, ‘Green’, ‘Blue’)
);

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