Database Worksheet - Grade 8: Maa'Rif For Education & Training Manarat International Schools Kingdom of Saudi Arabia

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

MAA’RIF FOR EDUCATION & TRAINING

MANARAT INTERNATIONAL SCHOOLS

KINGDOM OF SAUDI ARABIA

DATABASE WORKSHEET - Grade 8

Q1: A database has been set up showing information about cars:

No of Engine CO2 Fuel used No of


Car ref
doors (liters) (g/km) (km/liter) cylinders
A 3 1.4 145 15.3 4
B 4 2.0 193 12.3 4
C 5 2.5 231 10.9 6
0 3 2.0 190 11.2 6
E 4 1.3 120 17.5 4
F 5 1.8 180 14.6 4
G 4 3.0 240 9.5 6
H 4 1.2 115 19.7 3

1. What is the key field in this database table


.......................................................................................................................................

2. Using Car ref only, write down which cars would be output if the following search
condition was used:
(No of doors = 4) AND (Fuel used (km/liter) > 15)

.....................................................................................................................................

3. Write down a search condition to find out which cars have engines larger than 1.8
liters OR have CO2 emissions higher than 150 g/km .

........................................................................................................................................
4. The database is sorted in ascending order on Fuel used (km/liter). Using Car ref only,
write down the results of the sort.

........................................................................................................................................
Q2:A school library has a file for storing details of the books it has and a file for storing details
of its borrowers. The two files are linked using a common field.

Book File

Number
Code Title Author Published Cost
in stock
1857028898 The Code Book Simon Singh 1999 2 £10.99
0747591054 The Deathly Hallows J K Rowling 2007 8 £17.99
0748791167 Sepulchre Kate Mosse 2020 3 £18.99
0563371218 Full Circle Michael Palin 1997 1 £19.99

Years 10 and 11 Borrower File

Number Name Form Book Borrowed Due Back


0102 Me Te Loan 11A 1857028898 14/06/2010
1097 Gurvinder Moore 10C 0747591054 12/06/2010
0767 Akhtar Aftab 10B 0748791167 06/06/2010
0611 Graham Reeves 10D 0563371218 08/06/2010

1. How many records are there in the book file?

……………………………………………………….

2. How many fields are there in the borrower file?

……………………………………………………….

3. What type of database do these two files form?

……………………………………………………….

4. Which field is the primary key in the Book file?

……………………………………………………….

5. Which field is the foreign key?

……………………………………………………….
6. Which field has the data type currency?

……………………………………………………….

7. What data type would be most appropriate for the Due Back field?

……………………………………………………….

8. Name the most appropriate data type for the code.

……………………………………………………….

9. Name the most appropriate validation check for the Number field.

……………………………………………………….

10. There is an error in one of the fields. What is the error?

……………………………………………………….

11. What type of validation can be used to avoid such a mistake?

……………………………………………………….
Q3 A database showing the population of world cities has been produced. A section of the
database is shown below.

Ref Name of City Urban


Country Area Capital
No City Population (m) Population (m)
1 Tokyo Japan Asia 33.2 34.1 Yes
2 New York USA America 17.8 21.9 No
3 Sao Paulo Brazil America 17.7 20.2 No
4 Seoul S Korea Asia 17.5 22.3 Yes
5 Mexico City Mexico America 17.4 22.7 Yes
6 Osaka Japan Asia 16.4 16.8 No
7 Manila Philippines Asia 14.8 14.9 Yes
8 Mumbai India Asia 14.4 19.7 No
9 Jakarta Indonesia Asia 14.3 17.2 Yes
10 Calcutta India Asia 12.7 15.6 No

1. How many records are shown above?

......................................................................................................................

2. How many fields in each record are shown above?

......................................................................................................................

3. What data type is "Urban population"?

.......................................................................................................................................

4. Using Ref No only, which records would be found if the following search condition was
typed in

(Country = "India" OR Area = "America") AND (Capital = "No")

......................................................................................................................

5. Write a search condition to find the cities in Asia with a city population greater than 17
million OR an urban population greater than 20 million.

............................................................................................................................................

You might also like