Documente Academic
Documente Profesional
Documente Cultură
Variables are stored in RAM but it is necessary to let the program know the type of data that
each variable will hold.
Sample
Data type Description
data
Stores numbers that contain decimal places/values and can also store
REAL 17.65
integers
Example Question:
Q1. A picture gallery owner has decided to set up a database to keep information about the
pictures he has for sale. The database table, PICTURE, will contain the following fields:
Title; Artist; Description; Catalogue Number; Size (area in square centimeters); Price;
Arrived (date picture arrived at gallery); Sold (whether picture is already sold)
(a) (i) State what data type you would choose for each field.
Title: ..............................................................................................................
Artist: ...........................................................................................................
Description: ..................................................................................................
Catalogue Number: .......................................................................................
Size: .......................................................................................................
Price: ..........................................................................................................
Arrived: .........................................................................................................
Sold: ........................................................................................................[4]
Q2. Describe each of the following data types used in programming. In each case, give an example of
Char
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
String
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Boolean
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................[6]
June 2017
Q3. For a variable that you have used to record information about the cost of the outing in
Q4.. Complete the table below to show which data type would be best suited for some of the fields that
you used in question .
• Minimum Quantity
• Registration Number
• Date of Birth
• Colour
• Payroll Number