Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

UNIVERSITY OF LAGOS

SCHOOL OF POSTGRADUATE STUDIES


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

1 a The database approach entails some additional costs and risks that must be recognized and managed
when implemented. List and briefly explain five of such cost and risks (15 Marks)
b Briefly discuss the evolution of database systems (10 Marks)

2 a Give an example of each of the following and clearly explain why your example is this type of
relationship and not of some other degree: (6 Marks)
i ternary relationship ii unary relationship
b Give three reasons why many system designers believe that data modeling is the most important
part of the systems development process. (9 Marks)
c State two conditions that suggest the designer should model a relationship as an associative entity
type. (6 Marks)
d What is the degree of a relationship? List the three types of relationship degrees. (4 Marks)

3 a Draw ER Diagram(s) for the following situation: (If you believe you need to make additional
assumptions, clearly state them)
An art museum owns a large volume of works of art. Each work of art is described by an item code
(identifier), title, type, and size; size is further composed of height, width, and weight. A work of art is
developed by an artist, but the artist for some works is unknown. An artist is described by an artist
ID (identifier), name, date of birth, and date of death (which is null for still living artists). Only data
about artists for works currently owned by the museum are kept in the database. At any point in
time, a work of art is either on display at the museum, held in storage, away from the museum as part
of a traveling show, or on loan to another gallery. If on display at the museum, a work of art is also
described by its location within the museum. A traveling show is described by a show ID (identifier),
the city in which the show is currently appearing, and the start and end dates of the show. Many of
the museum works may be part of a given show, and only active shows with at least one museum
work of art need be represented in the database. Finally, another gallery is described by a gallery ID
(identifier), name, and city. The museum wants to retain a complete history of loaning a work of art
to other galleries, and each time a work is loaned, the museum wants to know the date the work was
loaned and the date it was returned. (20 Marks)
b Convert the ER diagram(s) in Question 3a to relations. (5 Marks)

4 a Describe the primary differences between the conceptual and logical data models. (6 Marks)

b Describe three types of anomalies that can arise in a table and the negative consequences of each. (9
Marks)
c List three conditions that you can apply to determine whether a relation that is in first normal form
is also in second normal form. (6 Marks)
d How are relationships between entities represented in the relational data model? Give an example.
(4 Marks)

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


a List the lecturers and the number of courses taken per lecturer. The result should include
Lecturer_Id, Lecturer_Name and number of courses. (4 Marks)
b List the Course Codes of courses having titles that begins with the word Introduction. (3 Marks)

c Insert a compulsory course, CSC305 titled Machine and Assembly Language, taken by Dr A. Chukwu
into the COURSE table. (3 Marks)
d Create a view for male Christian students. The view should include all the fields in the STUDENT
table (3 Marks)
e Delete all courses not taken by any student in the Course table. (3 Marks)

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

g Add 3 marks to CSC204 scores that are less than 40. (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
LAST_NAME LIKE '%DE%'; (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 LIKE 'CSC2%'); (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 Juliet Female 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