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

Mit802 2015 2016

The document contains exam questions for an Introduction to Database Management Systems course. It includes 6 questions testing various database concepts like normalization, entity relationship diagrams, and SQL queries. It also includes sample data relations and schemas for students, courses, results, and lecturers that are referenced in the questions.

Uploaded by

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

Mit802 2015 2016

The document contains exam questions for an Introduction to Database Management Systems course. It includes 6 questions testing various database concepts like normalization, entity relationship diagrams, and SQL queries. It also includes sample data relations and schemas for students, courses, results, and lecturers that are referenced in the questions.

Uploaded by

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

UNIVERSITY OF LAGOS

SCHOOL OF POSTGRADUATE STUDIES


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

1 a Contrast the following terms: (10 Marks)

i data dependence; data independence ii data; information


iii strong entity type; weak entity type iv database; data warehouse
v enterprise data model; conceptual data model
b How are relationships between tables expressed in a relational database? (5 Marks)

c Data modeling is the most important part of the systems development process.
Discuss. (5 Marks)
d Explain how a view can be used to reinforce data security. (5 Marks)

2 Consider the table below:

Table 1: Shipping Manifest

a Draw a relational schema and diagram the functional dependencies in the relation.
(10 Marks)
b In what normal form is this relation? (5 Marks)

c Decompose MANIFEST into a set of 3NF relations. (10 Marks)

3 a Draw ER Diagram(s) for the following situation: (If you believe you need to make
additional assumptions, clearly state them)
Stillwater Antiques buys and sells one-of-a-kind antiques of all kinds (e.g., furniture,
jewelry, china, and clothing). Each item is uniquely identified by an item number
and is also characterized by a description, asking price, condition, and open-ended
comments. Stillwater works with many different individuals, called clients, who sell
items to and buy items from the store. Some clients only sell items to Stillwater,
some only buy items, and some others both sell and buy. A client is identified by a
client number and is also described by a client name and client address. When
Stillwater sells an item in stock to a client, the owners want to record the
commission paid, the actual selling price, sales tax (tax of zero indicates a tax
exempt sale), and date sold. When Stillwater buys an item from a client, the owners
want to record the purchase cost, date purchased, and condition at time of
purchase. (20 Marks)
b Convert the ER diagram(s) in Question 3a to relations. (5 Marks)

4 a What is the primary purpose of normalization? (3 Marks)

b 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)
c Consider the following two relations for Tonia International College:
STUDENT(StudentID, StudentName, CampusAddress, GPA)
REGISTRATION(StudentID, CourseID, Grade)
Following is a typical query against these relations:
SELECT Student_T.StudentID, StudentName, CourseID, Grade
FROM Student_T, Registration_T
WHERE Student_T.StudentID = Registration_T.StudentID AND GPA > 3.0
ORDER BY StudentName
i On what attributes should indexes be defined to speed up this query? Give the
reasons for each attribute selected. (6 Marks)
ii Write SQL commands to create the tables for the relations taking cognizance
the associated indexes identified in (i) above. (10 Marks)

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

a Count the number of courses taken per student. The result should include Matric No
and number of courses. (4 Marks)
b List the Matric No, Last name and First name of students that offered CSC100. (3
Marks)
c Insert a female Muslim student with matric number 020805023, named Ahmed
Aminat and born on September 13th 1985 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 female students with last name ending with EYE in the STUDENT table. (3
Marks)
f Change the CSC205 to a compulsory course. (3 Marks)

g Count the number of male students that passed CSC102. (3 Marks)

h Add 5 marks to CSC204 scores. (3 Marks)

6 Use Figure 1 to answer the following questions:

2|Page
a Write SQL command to:

i Find the student with the lowest score. (3 Marks)

ii Find the average score per student. The output should also include MATRIC
_NO, LAST_NAME, FIRST_NAME and average score. (3 Marks)
iii List the students with no result. (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 '%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 =
'CSC100'); (3 MARKS)
c Write SQL command to create the tables. (8 Marks)

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

4|Page

You might also like