Introduction to Database Systems - Exam

THE UNIVERSITY OF DODOMA
COLLEGE OF INFORMATICS AND VIRTUAL EDUCATION
SCHOOL OF INFORMATICS

UNDERGRADUATE UNIVERSITY EXAMINATIONS
SECOND SEMESTER 2015/2016

CS 125: INTRODUCTION TO DATABASE SYSTEMS
Date: 18th July 2016
Time Allocated: 3 Hours


SECTION A (60 Marks)

Question One

Define the following terms as used in Database System

a) Database

b) Database Management System

c) Primary key

d) Foreign key

e) Super key


Question Two

a) Differentiate the following terms
i) First Database Normal form (1NF) and second Database Normal form (2NF)
(2 Marks)

ii) Insertion anomaly and Update anomaly
(3 Marks)

b) Briefly explain the main goal of database normalization when design the database
(2 Marks)

Question Three

Write TRUE for the correct statement and FALSE for the incorrect statement

a. A database is a collection of related data.

b. Data independence allows for changes in the physical storage without affecting the application programs.

c. A primary key can contain NULL values.

d. The relational model represents data as relations or tables.


e. DML statements are used to define the database structure.


f. The project operation is a binary operation that returns its argument relation with certain attributes left out.

g. Any relation that is not part of the logical model, but is made visible to a user as a virtual relation is called a view.

h. A user must guarantee that his or her transaction does not corrupt data or insert nonsense in the database.

i. Multimedia, relational, hypertext, network and object-oriented are all conventional data models.

j. View are defined by using DML statements.


Question Four

Given two relations ( R1 ) and ( R2 ), where ( R1 ) contains N1 tuples, ( R2 ) contains N2 tuples, and ( N2 > N1 > 0 ), give the minimum and maximum possible sizes (in tuples) for the resulting relation produced by each of the following relational algebra expressions. In each case, state any assumptions about the schemas for ( R1 ) and ( R2 ) needed to make the expression meaningful:
[2.5 Marks Each]

(i) ( R1 \cup R2 )

(ii) ( R1 \cap R2 )

(iii) ( R1 - R2 )

(iv) ( R1 \times R2 )


Question Five

a. List six drawbacks associated with file processing systems.
[3 Marks]

b. Mention six strengths of using DBMS.
[3 Marks]

c. Mention eight areas where database systems are applicable.
[4 Marks]


Question Six

Define the following concepts as applied in Database Systems
[2 Marks Each]

a. Database transaction.

b. Referential integrity.

c. Data model.

d. Data independence.

e. Cardinality of a relation.


SECTION B (40 Marks)

Question Seven

Consider a shop for flowers on the World Wide Web. It offers a selection of different bouquets (bunches of flowers) described in the table “Flowers”. The table “Customer” contains information about customers. Next, there is a table with information about orders and recipients (to whom the flowers should be delivered).

i. Print the name of “Loyal customers” and the total amount of money they have spent. (Loyal customers are those that have spent over $300).
[4 Marks]

ii. Print the name of customers that prefer mailing their flowers directly rather than send them to local flower shops (based on only the current deliveries).
[5 Marks]


Question Eight

Read the following scenario carefully and then answer the question that follows.

UPS prides itself on having up-to-date information on the processing and current location of each shipped item. To do this, UPS relies on a company-wide information system. Shipped items are the heart of the UPS product tracking information system. Shipped items can be characterized by item number (unique), weight, dimensions, insurance amount, destination, and final delivery date. Shipped items are received into the UPS system at a single retail center. Retail centers are characterized by their type, uniqueID, and address. Shipped items make their way to their destination via one or more standard UPS transportation events (i.e., flights, truck deliveries). These transportation events are characterized by a unique scheduleNumber, a type (e.g, flight, truck), and a deliveryRoute.

a. Draw the complete ERD
[12 Marks]

b. From the ERD in (a) above draw the corresponding logical schemas
[6 Marks]

c. From the Logical schema in (b) above draw the corresponding Data dictionaries
[6 Marks]

d. From the Data dictionaries in (c) above create the corresponding physical schema
[6 Marks]


END OF EXAMINATION PAPER