0% found this document useful (0 votes)
77 views1 page

Data Types Sophia.K

This document defines and describes various data types used in databases including numeric, date/time, character, binary, and enumeration types. It provides details on integer, floating point, decimal, date, time, character, binary, text and enumeration data types, specifying their storage sizes, value ranges and uses for storing different data like numbers, text, dates, images and other binary data in database tables.

Uploaded by

Sophia Kleina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views1 page

Data Types Sophia.K

This document defines and describes various data types used in databases including numeric, date/time, character, binary, and enumeration types. It provides details on integer, floating point, decimal, date, time, character, binary, text and enumeration data types, specifying their storage sizes, value ranges and uses for storing different data like numbers, text, dates, images and other binary data in database tables.

Uploaded by

Sophia Kleina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Autors:

Datu tips Skaidrojums


INTEGER or Whole or exact numbers range: from -2,147,483,648 to 2,147
INT
SMALLINT Small whole numbers. Range: -32,768 to 32,767
DECIMAL Number perfection(10,5):
NUMERIC An exact numeric value has a precision and a scale.precision>0int range: from -
10^38+1
FLOAT A data type composed of a number that is not an integer. It is used to define
numeric values with floating decimal point.
From 1.17549351 to 3.402823466
REAL Real data can hold a value 4 bytes in size, meaning it has 7 digits of precision (the
number of digits to the right of the decimal point). It's also a floating-point
numeric that is identical to the floating point statement float(24).
DOUBLE Not completely exact. Double-precision floating-point numeric value.
You can edit the precision and scale. The scale must be less than or equal to the
precision.

BIT The smallest unit of data in a computer.
The bit stores just a 0 or 1.
DATE Stores date in format YYYY-MM-DD

DATETIME Stores date and time information in the format YYYY-MM-DD HH:MI:SS
TIMESTAMP Stores number of seconds passed since the Unix epoch
TIME Stores time in the format HH:MI:SS
YEAR Stores year in 2 digits or 4 digit format. Range 1901 to 2155 in 4-digit format.
Range 70 to 69, representing 1970 to 2069.

CHAR Fixed length or total length are the same for the every single value(phone
number).
VARCHAR Max length->how much characters could be in cell.Variable-length storage with a
maximum length of 8,000 characters

BINARY Fixed length with a maximum length of 8,000 bytes

VARBINARY Used to store raw binary data up to a length of (32K – 1) bytes.
Value from 1 through 8,000.
BLOB Has similar characteristics as Binary Large Object. It was used to store large
quantities of binary data in a database. You can use it to store any kind of binary
data that you want, includes images, video, or any other kind of binary data that
you wish to store.Range:from 10 to 512 bytes.
TEXT Variable-length storage with maximum size of 2GB data

ENUM 1 of many options.
SET Allows pick many of many options.
JSON It is a text-based format. It is commonly used for transmitting data in web
applications ( e.g., sending some data from the server to the client, so it can be
displayed on a web page, or vice versa ),for storing JSON data.
Min: -2,147,483,648 and a max: 2,147,483,647

You might also like