DBMS Flashcards

(46 cards)

1
Q

data type are useful if columns or variables accept only two values plus not null. It is the smallest and fastest numeric data type.

A

Bit

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

smallest integer data type and only uses 1 byte of storage.

A

TINYINT

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

stores small whole numbers. The maximum negative number, –32,768, is a reserved value and cannot be used. Allow designers to place limits on both space size and data usage.

A

SMALLINT

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

It represents whole numbers. 9-10 digits of precision.

A

INT

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

A normal-size floating point number. The total number of digits is specified in size. The number of digits after the decimal point is specified in the d parameter. up to 15 digits decimal digits.

A

DOUBLE -

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  • Largest integer data type. It is intended for use when integer values might exceed the
    range that is supported by the int data type.
A

BIGINT

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

type of exact numeric type. It is used to store numbers with a predetermined number of digits and decimal places.

A

DECIMAL

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

is a precise numeric storage format in SQL databases, used to store numbers with a fixed number of decimal places. It allows specifying the total number of digits (precision) and the number of digits to the right of the decimal point (scale).

A

NUMERIC

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

an approximate number with floating point data.__________ value is approximate which means not all values can be represented exactly. FLOAT(24) is identical to REAL.

A

FLOAT

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

suitable for storing data that needs to represent larger or smaller numerical values, such as scientific or engineering calculations. It occupies 4 bytes with a precision of approximately 7 digits

A

REAL

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

stores integers like int , but gives a wider range of values at the cost of taking more memory. Long stores at least 32 bits, giving it a range of -2,147,483,648 to 2,147,483,647.

A

LONG

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

Stores only the date component without the time.
Example: 2024-02-21

A

DATE

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

Stores only the time component without the date.
Example: 12:30:45

A

TIME

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

Stores both date and time components.
Example: 2024-02-21 12:30:45

A

DATETIME

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

Fixed length with a maximum length of 8,000 characters

A

CHAR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • Variable-length storage with a maximum length of
    8,000 characters
A

VARCHAR-

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

Variable-length storage with provided max
characters, not supported in MySQL

A

VARCHAR(max)-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  • Variable-length storage with a maximum size of 2GB data
A

TEXT

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

Fixed length with a maximum length of 4,000 characters

20
Q

Variable-length storage with a maximum length of
4,000 characters

21
Q

Variable-length storage with a maximum size of 1GB data

22
Q

is a base-2 numeral system used in computing and
digital electronics.

23
Q

Miscellaneous Data Types

A

CLOB (Character Large OBject)-

BLOB (Binary Large OBject)]

XML (eXtensible Markup Language)-

JSON (JavaScript Object Notation)

24
Q

NULL in SQL represents a column field in the table with no value. NULL is different from a zero value and from “none”

25
constraint ensures that all values in a column are different.
UNIQUE
26
is a column (or combination of columns) that uniquely identifies each record in a database table.
Primary Key
27
is a critical link between tables in a database, ensuring data integrity by enforcing relationships between them.
FOREIGN KEY
28
Types of Index
Unique Index Single-Column Index Composite Index
29
To drop an INDEX constraint
DROP Index
30
are used to perform mathematical operations on the numerical values. SQL provides following operators to perform mathematical operations.
SQL Arithmetic Operators
31
in math is defined as the operation used to represent repeated multiplication.
Exponentiation
32
Give Logical operator
ALL EXISTS AND IN ANY IS NULL LIKE SOME NOT UNIQUE BETWEEN OR
33
Data types that do not fall into standard categories like integers, strings, or dates. Instead, these types are diverse and might be designed to handle specific kinds of data or scenarios.
Miscellaneous Data Types
34
TRUE if all of a set of comparisons are TRUE.
ALL
35
TRUE if all the conditions separated by AND are TRUE.
AND
36
TRUE if any one of a set of comparisons are TRUE
ANY
37
TRUE if the operand lies within the range of comparisons.
BETWEEN
38
TRUE if the subquery returns one or more records
EXISTS
39
TRUE if the operand is equal to one of a list of expressions.
IN
40
TRUE if the operand matches a pattern specially with wildcard.
LIKE
41
Reverses the value of any other Boolean operator
NOT
42
TRUE if any of the conditions separated by OR is TRUE
OR
43
TRUE if the expression value is NULL.
is NULL
44
TRUE if some of a set of comparisons are TRUE.
SOME
45
operator searches every row of a specified table for uniqueness (no duplicates).
UNIQUE
46
SQL Operator Precendence
Parentheses Identity, Negation Multiplication, Division Addition, Subtraction Comparison Logical Operators Assignment Operator