DBMS Flashcards

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

A

NCHAR

20
Q

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

A

NVARCHAR

21
Q

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

A

NTEXT

22
Q

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

A

BINARY

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”

A

Is NOT NULL

25
Q

constraint ensures that all values in a column are
different.

A

UNIQUE

26
Q

is a column (or combination of columns) that
uniquely identifies each record in a database table.

A

Primary Key

27
Q

is a critical link between tables in a database, ensuring data integrity by enforcing relationships between them.

A

FOREIGN KEY

28
Q

Types of Index

A

Unique Index
Single-Column Index
Composite Index

29
Q

To drop an INDEX constraint

A

DROP Index

30
Q

are used to perform mathematical operations on the numerical values. SQL provides following operators to perform mathematical operations.

A

SQL Arithmetic Operators

31
Q

in math is defined as the operation used to represent
repeated multiplication.

A

Exponentiation

32
Q

Give Logical operator

A

ALL
EXISTS
AND
IN
ANY
IS NULL
LIKE
SOME
NOT
UNIQUE
BETWEEN
OR

33
Q

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.

A

Miscellaneous Data Types

34
Q

TRUE if all of a set of comparisons are TRUE.

A

ALL

35
Q

TRUE if all the conditions separated by AND are TRUE.

A

AND

36
Q

TRUE if any one of a set of comparisons are TRUE

A

ANY

37
Q

TRUE if the operand lies within the range of comparisons.

A

BETWEEN

38
Q

TRUE if the subquery returns one or more records

A

EXISTS

39
Q

TRUE if the operand is equal to one of a list of expressions.

A

IN

40
Q

TRUE if the operand matches a pattern specially with wildcard.

A

LIKE

41
Q

Reverses the value of any other Boolean operator

A

NOT

42
Q

TRUE if any of the conditions separated by OR is TRUE

A

OR

43
Q

TRUE if the expression value is NULL.

A

is NULL

44
Q

TRUE if some of a set of comparisons are TRUE.

A

SOME

45
Q

operator searches every row of a specified table for uniqueness (no duplicates).

A

UNIQUE

46
Q

SQL Operator Precendence

A

Parentheses
Identity, Negation
Multiplication, Division
Addition, Subtraction
Comparison
Logical Operators
Assignment Operator