Page 307 - TP_IT_V1.0_C10_flipbpookl
P. 307
DATA TYPES IN DATABASE To open an already
Data types help you define the type of the data that can be stored in a field/ existing database:
column. Data types in LibreOffice Base are broadly classified into five main Short key Ctrl + O
categories, which are as follows:
Numeric Types
The numeric data types are used to store data in the form of numbers which can be integers or real numbers with
decimals. Arithmetic operations can be performed on numeric data.
We can use these data types for creating fields like RollNo., Phone number, Marks, Year of Joining, Salary, Cost, Amount
or any other numeric value.
The list of available numeric types is:
Data Type Name Signed Description
Tiny Integer TINYINT No Store integer range between 0 to 255
15
15
Small Integer SMALLINT Yes Store integer range between -2 to + 2 -1
31
31
Integer INTEGER Yes Store integer range between -2 to + 2 -1
63
63
Big Integer BIGINT Yes Range between -2 to + 2 -1
Number NUMERIC Yes Unlimited
Decimal DECIMAL Yes Unlimited
Real REAL Yes 5×e −324 to 1.79×10 308
Float FLOAT Yes 5×e −324 to 1.79×10 308
Double DOUBLE Yes 5×e −324 to 1.79×10 308
Alphanumeric/Text Data Type
It stores a set of numbers, alphabets or other characters. No arithmetic calculations can be performed on text data.
We can use this data type for creating name, address, city, customer name, product name, product description, etc.
The list of available Alphanumeric/Text Data type is:
Data Type Name Description
Memo LONGVARCHAR Store up to the max length or number indicated by user. It is used to store
some descriptive data having more than 255 characters. Memo data type
allows to store text data up to 64000 characters. For example: Medical
description of a patient, Student achievement details in student table.
Text (fix) CHAR Store exactly the length specified by user. It is used to store fixed number
of characters. For example, Mobile number, Pincode, License Number,
Passport Number etc. It uses fixed number of bytes specified.
Text VARCHAR Store up to the specified length but uses only variable length of characters
entered. The number of bytes allocated depends on the number of
characters. For example if Name in student table is VARCHAR(20) and
you save name as “Vedika” which has 7 characters then only 7 bytes out
of 20 will be used.
Text VARCHAR_IGNORECASE Store up the specified length. Comparisons are not case sensitive but
stores capitals as you type them.
Database Management System using LibreOffice Base 305

