Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Theory Questions
The Motor Vehicle Department of a company maintains a database with two tables
shown below to store information on vehicles and their owners.
1 | Page
DATABASE MANAGEMENT WORKSHEETS
Question#2
2 | Page
DATABASE MANAGEMENT WORKSHEETS
Question# 3
3 | Page
DATABASE MANAGEMENT WORKSHEETS
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)
4 | Page
DATABASE MANAGEMENT WORKSHEETS
Question# 4
5 | Page
DATABASE MANAGEMENT WORKSHEETS
6 | Page
DATABASE MANAGEMENT WORKSHEETS
Question# 5
Consider the following database which contains TWO tables that store data on
examinations held at a school.
TABLE 1: SUBJECT
TABLE 2: SCHEDULE
(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.
7 | Page
DATABASE MANAGEMENT WORKSHEETS
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
Question#8
The Office of Investment uses a database named FOREIGN with two tables
shown below to store data on foreign companies operating in the company:
8 | Page
DATABASE MANAGEMENT WORKSHEETS
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.
9 | Page