Data types Flashcards

(30 cards)

1
Q

SQL Datatypes (only names)

A
  • Binary datatype
  • Numeric datatype
  • Exact numeric datatype
  • String datatype
  • Date Datatype
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Further classification of string datatype

A

UNI string datatype

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

Binary Data Type (only names)

A
  • Binary
  • Varbinary
  • Image
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Maximum length of Binary - binary datatype

A

8000 bytes

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

Important point about binary-binary data type

A

Fixed length binary data

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

Maximum length of varbinary

A

8000 bytes

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

Important point about varbinary data type

A

Variable length binary data

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

maximum length Image datatype

A

2,147,483,647 bytes

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

Important point about image data type

A

Variable length binary data

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

Another name of image data type

A

BLOB: Binary Large Objects

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

Type of Numeric Data Type

A

Approximate numeric datatype
Exact numeric datatype

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

Type of approximate numeric data type

A

Float
Real

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

Range of Float approximate numeric data type

A

From -1.79E+308 to 1.79E+308

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

Description of Float approximate numeric data type (3)

A

Used for floating point value
Double precision
32 bit space

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

Range of real approximate numeric data type

A

From -3.40e+38 to 3.40e+38

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

Description of Real approximate numeric data type (3)

A

Single precession floating point value
Used to represent too large number or too small number
16 bit space

17
Q

Type of Exact Numeric data type

also tell which is integer and which is fraction

also size

A
  • bigint - integer (8 bytes)
  • int - integer (4 bytes)
  • smallint - inetegr (2 bytes)
  • tinyint - integer (1 byte)
  • bit - integer (1 bit)
  • decimal - fractional and accurate
  • numeric - fractional and accurate
  • money - fractional and accurate
  • smallmoney - fraction and accurate
18
Q

Difference between Decimal and floating data type

A

Decimal used to store exact and accurate number.
Floating point number can be rounded.

19
Q

Description BIGINT

A

to store large integers
represent in 2’s complement form
Extremely large whole number
used for Primary key if integer data type
More storage space required

20
Q

Description Decimal

A

Numeric data with fixed precision and scale
Allowed to specify both precision and scale
Used for exact numeric values
another name - Numeric

21
Q

Advantages of Decimal

A

Fixed precision
No rounding error
Data consistency

22
Q

Description Money

A

Used for monetary values such as currency

23
Q

type of Character string datatype

A

char
varchar
text

24
Q

maximum length of char data type

A

maximum 8000 characters

25
Description char
fixed length non-unicode characters (ASCII) one byte per character
26
Description varchar
variable length non-unicode characters
27
Description text
for too large text variable length non-unicode characters
28
maximum length of varchar data type
maximum 8000 characters
29
maximum length text data type
maximum 2,147,483,647 characters
30
Difference between varchar and text