You are on page 1of 3

UNIVERSITY OF LAGOS

SCHOOL OF POSTGRADUATE STUDIES


DEPARTMENT OF COMPUTER SCIENCES
MIT DEGREE EXAMINATIONS MAY 2017
FIRST SEMESTER 2016/2017 SESSION
MIT802: INTRODUCTION TO DATABASE MANAGEMENT SYSTEM
Instruction: Answer any four Questions Time Allowed: 2 hours

1 a Discuss the following in the context of file processing system: (10 Marks)

i Program-Data Dependence ii Duplication of Data


iii Program Maintenance iv Data Sharing
v Development Times
b Briefly describe the following components of the database environment (15 Marks)

i Database Management System ii Repository


iii Application programs iv Database
v Computer-aided software engineering (CASE) tools

2 a Discuss the database development activities carried out during the systems development
life cycle. (15 Marks)
b Explain the differences between user views, a conceptual schema, and an internal schema
as different perspectives of the same database. (10 Marks)

3 a Draw ER Diagram(s) for the following situation: (If you believe you need to make additional
assumptions, clearly state them)
The loan office in a bank receives from various parties requests to investigate the credit
status of a customer. Each credit request is identified by a Request ID and is described by a
Request Date and Requesting Party Name. The loan office also receives results of credit
checks. A credit check is identified by a Credit Check ID and is described by the Credit Check
Date and the Credit Rating. The loan office matches credit requests with credit check
results. A credit request may be recorded before its result arrives; a particular credit result
may be used in support of several credit requests. (20 Marks)
b Convert the ER diagram(s) in Question 3a to relations. (5 Marks)

4 a List six properties of relations. (6 Marks)

b Discuss the anomalies that can occur in a relation that is in first normal form but not in
second normal form (9 Marks)
c List the conditions that you can apply to determine whether a relation that is in second
normal form is also in third normal form. (6 Marks)
d What do you understand by the following: (4 Marks)

i Primary Key ii Foreign key


iii Composite Key iv Candidate Key

5 Using Figure 1, write SQL commands for the following:

a Count the number of courses taken per lecturer. The result should include Lecturer_Id and
number of courses. (3 Marks)
b List the Matric No and Last name of students that scored 40 and above in CSC204. (4 Marks)

c Insert a male Muslim student with matric number 020805023, named Sanni Sambo and
born on November 5th 1990 in the STUDENT table. (3 Marks)
d Create a view for female students that offered compulsory courses. The view should include
all the fields in the STUDENT table (3 Marks)
e Delete all students with last name containing ADE in the STUDENT table. (3 Marks)

f Change the CSC205 to a compulsory course. (3 Marks)

g Subtract 5 marks from CSC204 scores. (3 Marks)

h List ID and name of lecturers not taking any course. (3 Marks)

6 Use Figure 1 to answer the following questions:

a Write SQL command to:

i Find the Matric Number of the student with the highest score in CSC100. (3 Marks)

ii Change the religion of Njum Adeola and Adewoye Emmanuel to Islam (3 Marks)

iii List the courses offered by FODEKE. (3 Marks)

b Determine the output of the following SQL command:

i SELECT A.LECTURER_ID, LECTURER_NAME, COURSE_CODE FROM LECTURER A LEFT JOIN


COURSE B ON (A.LECTURER_ID = B. LECTURER_ID); (3 Marks)
ii SELECT MATRIC_NO, LAST_NAME, FIRST_NAME, DATE_OF_BIRTH FROM STUDENT WHERE
FIRST_NAME LIKE '%YE'; (2 Marks)
iii SELECT MATRIC_NO, LAST_NAME, FIRST_NAME FROM STUDENT WHERE MATRIC_NO
NOT IN (SELECT MATRIC_NO FROM COURSE WHERE COURSE_CODE= 'CSC204'); (3
Marks)
c Draw an E-R Diagram for the student records relations. (8 Marks)

Figure 1: Student Records Relations

COURSE (COURSE_CODE, COURSE_TITLE, STATUS, LECTURER_ID)


COURSE_CODE COURSE_TITLE STATUS LECTURER_ID
CSC100 Computer as a Problem-Solving Tool compulsory S0003
CSC101 Use of Packages compulsory S0002
CSC102 Introduction to Discrete Mathematics compulsory S0003
CSC204 Data Structure and Data Management compulsory S0001
CSC205 Introduction to Numerical Methods elective S0004
CSC207 Introduction to Information Processing elective S0002

2|Page
STUDENT(MATRIC_NO, LAST_NAME, FIRST_NAME, SEX, RELIGION, DATE_OF_BIRTH)
MATRIC_NO LAST_NAME FIRST_NAME SEX RELIGION DATE_OF_BIRTH
010805036 ADEWOYE Emmanuel Male Christianity 27/10/1981
010805037 NJUM Adeola Female Christianity 18/03/1981
010805038 FODEKE Jude Male Christianity 15/01/1982
010805039 OTUTEYE Kolawole Male Christianity 13/07/1969
010805040 ADEOYE Bamitale Male Islam 21/09/1972
010805041 FALANA Jubril Male Islam 24/03/1984

RESULT(MATRIC_NO, COURSE_CODE, SCORE)


MATRIC_NO COURSE_CODE SCORE
010805036 CSC100 58
010805036 CSC101 75
010805037 CSC100 58
010805038 CSC102 45
010805038 CSC204 42
010805039 CSC204 38
010805040 CSC102 49
010805040 CSC205 43
010805040 CSC207 43

LECTURER (LECTURER_ID, LECTURER_NAME)


LECTURER_ID LECTURER_NAME
S0001 Prof. O. Olatunde
S0002 Dr. A. Haruna
S0003 Mrs. Glory Ekpe
S0004 Dr. A. Ajao
S0005 Dr A. Chukwu

3|Page

You might also like