Data Types
A data type is a classification of data into groups according to
the kind of data they represent
Computers use different data types to represent different
types of data in a program
The basic data types include:
o Integer: used to represent whole numbers, either
positive or negative
Examples: 10, -5, 0
o Real: used to represent numbers with a fractional part,
either positive or negative
Examples: 3.14, -2.5, 0.0
o Char: used to represent a single character such as a
letter, digit or symbol
Examples: 'a', 'B', '5', '$'
o String: used to represent a sequence of characters
Examples: "Hello World", "1234", "@#$%
o Boolean: used to represent true or false values
Examples: True, False
We can declare variables as follows:
Python Java Visual Basic
variable_name = data_type Dim variable_name As
Syntax
value variable_name; data_type
Example x=5 int x Dim x As Integer
Data types pseudocode
There are various different types of data, for example a number is not the
same a word! Even numbers come in different types, some have decimals
and some don't. Below are data types in Python and examples.
Character: A single letter, number, punctuation mark etc
Real/Float: A number with a decimal point
Integer: A whole number (a number without a decimal point)
Boolean: True or False
String: Letters and numbers
Data types in use
Common data types
Data types can change from one Database Management
System to another, but here is a list usually found in
most:
Data Type Description
Number Numbers
Date/Time Date and/or time
Yes/No, True/False, On/Off (two
Boolean
options only)
Text Text
Autonumber Automaticly generated number
A number formatted to a currency of
Currency
choice