You are on page 1of 3

UNIVERSITY OF LAGOS

SCHOOL OF POSTGRADUATE STUDIES


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

1 a List and briefly discuss six (6) major components of a typical database environment (12 Marks)

b Why are data models important? (4 Marks)

c Explain the differences between user views, a conceptual schema, and an internal schema as
different perspectives of the same database. (6 Marks)
d In which of the five phases of the SDLC do database development activities occur? (3 Marks)

2 a What is the degree of a relationship? List the three types of relationship degrees and give an example
of each. (7 Marks)
b Give an example for each of the following, and justify your answer: (12 Marks)
i. derived attribute ii. multivalued attribute iii. atomic attribute
iv. composite attribute v. composite identifier attribute vi. optional attribute
c Contrast the following terms: (6 Marks)
i. entity type; relationship type ii. strong entity type; weak entity type
iii. degree; cardinality

3 a Draw EER Diagram(s) for the following description of a law firm: (If you believe you need to make
additional assumptions, clearly state them)
Each case handled by the firm has a unique case number; a date opened, date closed, and judgment
description are also kept on each case. A case is brought by one or more plaintiffs, and the same
plaintiff may be involved in many cases. A plaintiff has a requested judgment characteristic. A case is
against one or more defendants, and the same defendant may be involved in many cases. A plaintiff
or defendant may be a person or an organization. Over time, the same person or organization may
be a defendant or a plaintiff in cases. In either situation, such legal entities are identified by an entity
number, and other attributes are name and net worth. (15 Marks)
b Convert the ER diagram(s) in Question 3a to relations. (5 Marks)

c Give a physical database design for the relations in Question 3b. (5 Marks)

4 a Summarize six important properties of relations. (6 Marks)

b Describe how the following components of an E-R diagram are transformed into relations: (15
Marks)
i. relationship (1:M) ii. relationship (M:N) iii. multivalued attribute
iv. weak entity v. composite attribute
c Explain how each of the following types of integrity constraints is enforced in the SQL CREATE
TABLE commands: (4 Marks)
i. entity integrity ii. referential integrity

5 a What options are available for controlling data integrity at the field level? (4 Marks)

b List three common situations that suggest that relations be denormalized before database
implementation. (6 Marks)
c State five rules of thumb for choosing indexes. (5 Marks)

d Indexing can clearly be very beneficial. Why should you not create an index for every column of
every table of your database? (4 Marks)
e Explain some possible purposes of creating a view using SQL. In particular, explain how a view can
be used to reinforce data security. (6 Marks)

6 Use Figure 1 to answer the following questions:

a Write SQL command to:

i Find the Last Name of the student with the lowest score in CSC204. (3 Marks)

ii Change the religion of students born before year 1980 to Islam (3 Marks)

iii List the Matric Number, Last Name and First Name of students taught by Dr. A. Haruna. (5
Marks)
iv Add 10 marks to scores of students for compulsory courses only. (3 Marks)

b Determine the output of the following SQL command:

i SELECT A.LECTURER_ID, LECTURER_NAME, COURSE_CODE, COURSE_TITLE 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 'Ju%'; (2 Marks)
iii SELECT MATRIC_NO, LAST_NAME, FIRST_NAME FROM STUDENT WHERE MATRIC_NO IN (SELECT
MATRIC_NO FROM RESULT WHERE COURSE_CODE LIKE 'CSC2%'); (3 Marks)
c Rewrite the SELECT statement in 6biii without the inner SELECT. (3 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

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

2|Page
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