ProgrammingSequence, selection, iteration, procedures, functions, modules, parameters, compilers, interpreters

Syllabus Detail

  • integer, real, character, string, Boolean, 11 GEN 11 ATAR, 12 GEN, 12 ATAR
  • complex; records, one dimensional arrays 12 ATAR

Background

  • Data types are critical to a computer system in order for it to process data
  • The type, or characteristics of a piece of data define how it can be processed
  • They also define the data's range and validity, and how said information is stored
  • Read more about Data Types via The Computing Teacher's article on Data Types

 

Basic Data Type Characteristics

Data Type Range Storage (Bytes)  Example 
Integer -2,147,483,648 to 2,147,483,648 4  25,405
Real Real data types are infinite numbers that can't be referenced by a computer.
These include numbers as fractions or decimals.
Character -  1  'a', 'b', '#', '@', '['
String -

 Dependant on string size

"This is a string of text."

MySQL Specific Example:
VARCHAR(30) will allow for a maximum of 30 characters

Boolean -  2

True or False
1
or 0
On
or off

 

Complex Data Type Characteristics

Data Type Explanation Example 
Record A record refers to a row in a database. The range and size of the record are completely dependent on the content of said row. Read The Computing Teacher's article on Database Components here.

 Each individual horizontal row in this database is known as a record.

Capture
Source: Apache.org

1-Dimensional Arrays Also known as a single-dimension array, 1D arrays are used to hold a group of the same type (e.g. data type) items. Arrays are used heavily throughout programming of all types to store related information.

 # Example written in PHP

$classMates = array(
    "William",
    "Bob",
    "Jessica",
    "Freddie",
    "Anne"
);

This provides an example of an array named classMates with 5 entries. All items within the array have the data type String.

 

Further Research

  • View a list of common MySQL data types here
  • View a list of Visual Basic data types here
  • View a list of data type ranges from Microsoft here

 

Worksheet and Practice (yet to be added)

Found an error or have an enhancement? Please let us know via this contact form

page updated Feb '17