7
Data Types

Pp2 data types

Embed Size (px)

Citation preview

Page 1: Pp2 data types

Data Types

Page 2: Pp2 data types

Data Types

• Figures & Facts = alphanumeric characters• Alphanumeric characters can be grouped

into 5 data types:– Boolean– Real– Integer– Text/String– Date/Time

Page 3: Pp2 data types

Boolean• This data type holds one of two values, for

example:– yes/no – true/false – 0 / 1 – Male/Female

• A boolean data type is used to answer questions where there are exactly two options, three options would mean it was no longer boolean data.

• Example:– Has the heating been turned on? Yes / No – Are you male? Yes / No

Page 4: Pp2 data types

Real

• This data types contains NUMBERS which will have DECIMAL places

• Example:– Room length in metres 45.76m wide– Prices of Goods £1.75– Height of People 1.82m

Page 5: Pp2 data types

Integer

• This data types contains WHOLE NUMBERS with NO decimal place.

• Example:– TV Channel 1– C0ding Responses 1 – 4– House Prices £275000

Page 6: Pp2 data types

Text/String

• This is alphanumeric, contains numbers, text and symbols

• Example:– Post Code RM8 1JT– Telephone Number 0208 270 4242– Address 10 Downing Street

Page 7: Pp2 data types

Date/Time

• This contains numbers and letters, which depend on format used, could be used to display date, time

• Example: Date 25th October 2009

or 25/10/09

Time 12.45.20