0% found this document useful (0 votes)
158 views4 pages

Advanced Database System Exam Paper Fall 2022 Ictu

Uploaded by

hixel50400
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views4 pages

Advanced Database System Exam Paper Fall 2022 Ictu

Uploaded by

hixel50400
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

FACULTY OF INFORMATION AND COMMUNICATION TECHNOLOGIES

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:

 This paper is made of four sections: A, B, C and D.


 All sections are compulsory.
 Each student is expected to present in 15 minutes.
 Credit is given for legibility, clarity of expressions and use of relevant illustrations.
 Clearly write your registration number on each answer sheet used

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 description of the intervention


 The date of the beginning of the intervention
 The precise qualification of each intervener (there are about twenty possible qualifications)
 The expected number of employees for x days
Each qualification has a corresponding daily rate. The SME allows itself a certain amount of flexibility on the
precise determination of the qualification of its employees in the following way:

 Each person has a basic qualification.


 At each intervention, it is possible to readjust the qualification.
 The qualification is determined for a given contract.
Give the Conceptual Data Model and hence the Logical Data Model (10 marks)
SECTION B
Exercise 1: CINEMA

Consider the Schema of the CINEMA database below:

• FILM (FILM_NUMBER, TITLE, TYPE, YEAR, DURATION, BUDGET, DIRECTOR, SALARY)

• DISTRIBUTION (FILM_NUMBER, ACTOR_NUMBER, ROLE, SALARY)

• PERSON (PERSON_NUMBER, LASTNAME, FIRSTNAME)

• ACTOR (ACTOR_NUMBER, AGENT, SPECIALTY, HEIGHT, WEIGHT)

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.

i) Give the conceptual data model of the above (E-R Diagram)


ii) Convert this conceptual data model to logical data model. Hence, write the following SQL queries
iii) Give the list of cars and serial numbers sold after the 1st of January 2023.
iv) Give the name of the car with the highest sales
v) Give the seller with the lowest discount
vi) Give the profit of each store for the month of December 2022
vii) Give the best customer (The customer who has paid in the most money to the company)
viii) The brand of the car with the highest discount
ix) The car with the highest tag price (10 marks)
SECTION C
Implement exercise 1 and 2 of section B in MySQL (30 marks)
SECTION D
Exercise 1
The following relation describes orders made by clients with the products and quantities ordered per client.
Order (Order_Number, Order_Date, Client_Number, Client_Address, Product_Number, Price, Quantity)
a) Identify the primary key of this relation (Use Functional Dependence)
b) Identify the normal form of this relation
c) Put this relation in third normal form (5 marks)

3
Exercise 2
Consider the ICT department of ICTU with the relation:

Department (Student_Matricule, Mark, level, Course, Module, Instructor_Number, Instructor_Name,


Student_Name, Hour) with the following functional dependences:
1. Student_Matricule → Student_Name, level
2. Instructor_Number → Instructor_Name
3. Course → Module
4. Course, Module → Hour
5. Level, Course, Module → Instructor_Number, Instructor_Name
6. Student_Matricule, Course, Module → Mark
a) Explain each functional dependence FD
b) Eliminate redundant FDs
c) Normalize the relation to 3NF (5 marks)
Exercise 3
We want to create a company personnel database organized as follows
- The company has a set of departments
- Each department has a set of employees, a set of projects, and a set of offices
- Each employee has a job history (set of jobs the employee has held)
- For each such job, the employee also has a salary history (set of salaries while employed on that job)
- Each office has a set of phones
The database contain the following information:

- 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

You might also like