DBMS Flashcards
data type are useful if columns or variables accept only two values plus not null. It is the smallest and fastest numeric data type.
Bit
smallest integer data type and only uses 1 byte of storage.
TINYINT
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.
SMALLINT
It represents whole numbers. 9-10 digits of precision.
INT
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.
DOUBLE -
- Largest integer data type. It is intended for use when integer values might exceed the
range that is supported by the int data type.
BIGINT
type of exact numeric type. It is used to store numbers with a predetermined number of digits and decimal places.
DECIMAL
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).
NUMERIC
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.
FLOAT
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
REAL
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.
LONG
Stores only the date component without the time.
Example: 2024-02-21
DATE
Stores only the time component without the date.
Example: 12:30:45
TIME
Stores both date and time components.
Example: 2024-02-21 12:30:45
DATETIME
Fixed length with a maximum length of 8,000 characters
CHAR
- Variable-length storage with a maximum length of
8,000 characters
VARCHAR-
Variable-length storage with provided max
characters, not supported in MySQL
VARCHAR(max)-
- Variable-length storage with a maximum size of 2GB data
TEXT