Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1|Page
Database Management Worksheet
2|Page
Database Management Worksheet
Question#2
3|Page
Database Management Worksheet
4|Page
Database Management Worksheet
Question# 3
A database contains data on motor vehicle accidents involving the driver, passenger, pedestrian, cyclist
or other factors in recent years. He wants to extract some information based on the following tables:
Table: CATEGORY
Type Name
DR Driver
PA Passenger
PE Pedestrian
CY Cyclist
OT Other
Table: ACCIDENTS
(c) State the fields in EACH Table that would be used to link the two tables (2 marks)
(ii) all cyclists who were not insured with BIC (2 marks)
5|Page
Database Management Worksheet
Question# 4
6|Page
Database Management Worksheet
7|Page
Database Management Worksheet
Question# 5
Consider the following database which contains TWO tables that store data on examinations held at a
school.
TABLE 1: SUBJECT
25 Biology $45.00
45 English A $40.00
86 Mathematics $40.00
91 IT $55.00
TABLE 2: SCHEDULE
25 1 Morning Hall 1
25 2 Afternoon Lab 2
91 1 Afternoon Room 1 1
91 2 Morning Library 2
86 1 Morning Hall 1
(c) State the data type of EACH field in the SUBJECT table.
(d) Write a query to list all the papers that occur in the Morning and were held in the Hall.
(e) How many fields are in the SCHEDULE table and name them?
Question # 6
A beverage manufacturer uses a database that contains two tables to store information on customers.
8|Page
Database Management Worksheet
TABLE 1: CATEGORY
Type Name
D Distributor
W Wholesaler
R Retailer
TABLE 2: CUSTOMER
CNO CNAME TYPE OUTLETS YTD SALES
D100 Bish and Sons D 5 300,000.00
R100 Saywack R 1 25,000.00
W100 Corbin W 2 75,000.00
D200 Hamilton D 3 100,000.00
W200 Singh W 3 65,000.00
R200 Mohan R 2 50,000.00
W300 Peter W 2 30,000.00
Question# 7
The Traffic Department is concerned about reckless driving by drivers of public transportation
vehicles using a particular route. On a daily basis, the traffic development would like to store
information on the Registration Number of the Vehicle, the type of Vehicle (Bus, Mini-Bus, and Hired
Car), the driver of the vehicle and the number of tickets issued to the driver. You have been asked to
create a database table named TICKET to store.
(a) Create the structure of the table TICKET. Your structure should indicate the name, data type and
size for EACH field in your table.
(b) State ONE reason for using a form to input data into your table.
(c) Give ONE example of a record in the TICKET table.
(d) Suppose you now need to store the sex of the driver, what would you do to accomplish this task,
assuming that your table has records already
(e) Write a query to show ALL female drivers of Hired Cars.
(f) How would you print the data in table for the date, 24/12/06?
Question#8
9|Page
Database Management Worksheet
The Office of Investment uses a database named FOREIGN with two tables shown below to store
data on foreign companies operating in the company:
Table 1: COMPANY
Table 2: COUNTRY
Ccode Cname
US United State of America
CA Canada
TT Trinidad and Tobago
RU Russia
(a) State the data type of the Sector and Employees fields of the COMPANY table.
(b) Identify a primary key for the COMPANY table.
(c) The records in the COMPANY table are sorted. Indicate the field name and the order of the sort.
(d) State the name of the field that would be used to join the two tables.
(e) Write a query to find ALL companies with over 200 employees in the Telecommunications sector.
10 | P a g e