INFORMATION TECHNOLOGY – GRADE 11
7 February 2012
PRACTICAL ClASS TEST
Examiner: G.Cilliers Time: 60 Minutes -------------------------------------------------
Examine the Database called ResidenceDataBase found in the folder called Question 1 SQL and answer the questions that follow: Save your work on your username in a folder called your Name and Surname.
| Question| Answer (to be written in SQL)| Mark|
1.1| Write a query to select all the Residence names only once in the Residence TB | | 3| 1.2| Write a query to display the cell number of the primaria of Protea| | 3| 1.3| Write a query that displays the name, surnames and town of origin of all the primaria who has a cell number starting with 082| | 4| 1.4| Formulate anSQL statement to display all the fields in the ResidenceTb sorted alphabetically according to the names of the Residences. | | 3| 1.5| Formulate an SQL statement to display the ResidenceName, NumberOfPersons and CostPerPerson fields for lodgings which are Double Flats who are more than R13000 per persone.| | 4| 1.6| Write a quiery to count the number of residence in the residence TB| | 3| 1.7| Write a query that displays the Cell number and names of the Primaria who are from Johannesburg.| | 3| 1.8| Write a SQL statement to select all fields of all items containing the word “DF” in the TypeOfRoomOrFlat field in the ResidenceTb table and which have a percentage for meals less or equal to 45| | 5| 1.9| Some of the entries in the field named TypeOfRoomOrFlat are entered as 'SR' (Single Room) in the ResidenceTb.Formulate an SQL statement to replace all entries of 'SR' with 'DR' (Double Room). | | 4| 1.10| Formulate an SQL statement to insert a new record into the PirmariiTb table with the values 'Heemstede', ‘Gerda Otto', '0760072008' and...