Advanced Database System Exam Paper Fall 2022 Ictu
Advanced Database System Exam Paper Fall 2022 Ictu
FALL 2022
FINAL EXAMINATION
COURSE TITLE: ADVANCED DATABASE SYSTEMS
COURSE CODE: BSC-CS4123
INSTRUCTOR: Engr. Tanwi Nkiamboh
DATE: 09/02/2023
DURATION: 4 Hours
INSTRUCTIONS:
1
SECTION A
Exercise 1: Examination
- The national exams are managed by the Academic Inspection and concern the students of this academy.
Students must complete a numbered registration file before December 31 of the current school year. This file
includes the student's name, date of birth, school and the name of the exam. A school is defined by its code,
name, address and city.
- Each exam has its own set of tests, each with a coefficient. Each exam is held on the same date throughout the
academy.
- The management of these exams also includes the convocation of about ten teachers from the academy to
the committee that writes the subject of each test. This committee meets at the academic inspectorate at least
two months before the date of the test. The corrections take place the day after the test. A teacher is known by
his or her number, name, telephone number, address, city and school.
- The student's marks are written on a slip, which is sent to the jury in charge of examining the final admission
of the candidate.
Give the Conceptual Data Model and hence the Logical Data Model (10 marks)
Exercise 2: Management of SME
Given a SME specialized in the provision of employees from its clients. Each intervention gives rise to a
contract with the client. The main information of the contract are:
The underlined attributes are the identifiers of the given relations. Give the SQL queries to answer the following questions.
2
i) Find the list of all the films.
ii) Find the list of films whose length exceeds 180 minutes
iii) Give the list of all the type of films
iv) Give the number of films by type
v) Find the title(s) and year(s) of the longest film(s).
vi) Find all the "pairs of actors", i.e., the actors having played the "Lead" role in the same film.
vii) Find the names of people who are not agents, actors or directors.
viii) Give the last name and first name of the directors who have acted in at least one of their own films
ix) What is the total salary of the actors of the film "The White House"
x) For each Cena’s film (title and year), give the total actors’ salaries. (10 marks)
Exercise 2:
Consider a company selling cars. A car model is described by a brand and a name. A car is identified by a serial number,
and has a model, a color, a tag price, and the cost price (price at which the car was bought). For each customer, we know
the last name, first name and address. Among the customers are the former owners of the used cars, as well as people
who bought a car at the store. When a sale is made, we know the seller (whose last name, first name, address and salary
are known) and the actual purchase price (taking into account a possible discount). Each seller receives a bonus of 5% of
the difference between the purchase price and the cost price of the car. The company is divided into a number of stores
and each seller operates in a single store. Each car is, or has been stored in certain stores and is sold in the last store where
it was stored. We keep track of the dates of arrival and departure from the stores. A transfer of a car between two stores
is done during the day.
3
Exercise 2
Consider the ICT department of ICTU with the relation:
- For each department: department number (unique), budget, and the department manager’s employee
number (unique)
- For each employee: employee number (unique), current project number, office number, and phone
number. Also, title of each job the employee has held, plus date and salary of each distinct salary
received in that job
- For each office: office number (unique), floor area, and phone number (unique) for all phones in that
office
a) List the attributes and what are the functional dependences linking them
b) Deduce a schema for the relations
c) Normalize this schema to 3NF (10 marks)
4