Creating Tables Flashcards

1
Q
  • fixed-length character column
  • maximum length is 255
  • default length is 1 character
A

CHAR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • variable-length character data
  • maximum length is 65,535
  • no default size
A

VARCHAR

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

used for floating/real numbers

A

DECIMAL

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

is the total no. of digits to the left & right of the decimal point

A

p (precision)

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

is the no. of positions to the right
of the decimal point

A

s (scale)

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

stores integer values (whole numbers)

A

INT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • stores date and time
  • default format is YYYY-MM-DD
A

DATE

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

Rules used to enforce business rules,
practices, and policies – and to ensure
the accuracy and integrity of data.

A

Constraints

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  • determines which column(s)
    uniquely identifies each row
  • can’t be NULL and values must
    be unique
A

PRIMARY KEY

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

ensures that if a value is
entered into a specified column of the
child table, it must already exist in
the parent table

A

FOREIGN KEY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  • ensures that all data values stored
    in a specified column are unique
  • allows NULL values
A

UNIQUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • ensures that a specified condition
    is true before the data value is added to a table
A

CHECK

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

used to set a default value for a
specified column

A

DEFAULT

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

ensures that a specified column
cannot contain a NULL value

A

NOT NULL

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