+ All Categories
Home > Documents > Chapter 05 data types

Chapter 05 data types

Date post: 13-Mar-2016
Category:
Upload: nicholas-patterson
View: 229 times
Download: 2 times
Share this document with a friend
Description:
Booklet covering the data types section of the iGCSE ICT syllabus
11
CHAPTER 05 – DATA TYPES Chapter 05 – Data Types 0
Transcript
Page 1: Chapter 05 data types

Chapter 05 – Data Types

0

CHAPTER 05 – DATA TYPES

Page 2: Chapter 05 data types

Chapter 05 – Data Types

Logical / Boolean dataCan only have two values: true or false. This works if there are only two possible responses to a question or situation, i.e. (Yes / No) (True / False) (Male / Female) (1 or 0).

This is made most use of when carrying out a search in a database or on the internet. In these cases, logical operators are used which are based on true (i.e. binary 1) or false (i.e. binary 0) logic.

Uses of “AND” “OR” and “NOT”

Taken from: http://www.teach-ict.com/gcse_computing/ocr/databases/logical/miniweb/pg5.htm

1

Types of dataThere are several data types found in most computer systems:

Logical / Boolean Alphanumeric / Text Numeric Date

Page 3: Chapter 05 data types

Chapter 05 – Data Types

Alphanumeric and text dataThe letters A-Z are referred to as text;

The letters A-Z plus the numbers 0-9 are referred to as alphanumeric (although some definitions also include the remaining keyboard characters).

Numeric dataWhole numbers are referred to as integers (e.g. floors in a hotel; students in a class; wheels on a car)

Numbers containing decimals are referred to as real numbers (e.g. temperatures; prices; height)

Numeric data also includes positive and negative numbers, as well as zero.

Date dataThis can be written in many forms, for example:

Number formatsdd/mm/yyyy (25/03/2014)dd/mm/yy (25/03/14)dd.mm.yy (25.03.14)yyyy-mm-dd (2014-03-25)

Letter format for monthdd mmmm yyyy (25 March 2014)dd-mmm-yyyy (25-Mar-2014)

It is important that dates are typed in consistently so that sorts and searches are manipulated correctly by the computer.

2

Page 4: Chapter 05 data types

Chapter 05 – Data Types

Data StructureData is stored in files, which consist of records, which in turn consists of fields. For example, a school may set up a file to include information about their pupils in the following format:

In this

example the Student No: is the “key field” or “primary key”. Each primary key is unique and is used to locate a record in a file during a search operation.

In reality, the student file would be much larger, containing all the records for all the school’s pupils. This type of file is often referred to as a flat file structure.

All the data is held in a table.

DatabasesA database is a collection of information which is structured in some way to permit manipulation and searching of data.

Why are databases used? • They promote data consistency. When data is updated on a database it is up to date for any

application which uses the database

• Data duplication is reduced to a minimum since only one copy of each data item needs to be kept

• It is relatively easy to expand the database if some new application is being considered

• Security of data is easier to monitor and maintain. Data access can be controlled by database “front end”; the actual database will be invisible to all users except the database administrator.

3

Page 5: Chapter 05 data types

Chapter 05 – Data Types

4

Relational databasesWhereas in flat file databases there is a single table, relational databases consist of a number of separate tables which are related.

Each table contains a primary (key) field that is also a field in at least one other table.

It is then possible to combine data from different tables to produce a report which only contains the required information.

Taken from Student Handbook for ICT: IGCSE by Gareth Williams and Anne Bagwell

Page 6: Chapter 05 data types

Chapter 05 – Data Types

Analogue and digital dataDigital data definition: discrete, fixed values in a given range

Analogue data definition: continuous physical variable, producing an infinite number of values within a given range (e.g. length, weight, temperature, pressure, etc. can take any value, depending on the accuracy to which they are measured). These values are measured by an analogue device.

Speedometer represents speed by showing the position of a pointer on a dial.

Thermometer represents temperature by the height of the liquid column.

For the computer to accept and understand the physical data from sensors it will need to be converted from analogue to digital using an analogue to digital converter (ADC).

In a control system the computer would need to also send out signals. These would need to be converted from Digital to Analogue using a digital to analogue converter (DAC)

5

Page 7: Chapter 05 data types

Chapter 05 – Data Types

Past Paper questions

6

Page 8: Chapter 05 data types

Chapter 05 – Data Types

7

Page 9: Chapter 05 data types

Chapter 05 – Data Types

8

Page 10: Chapter 05 data types

Chapter 05 – Data Types

9


Recommended