Вы находитесь на странице: 1из 3

RICHFIELD GRADUATE INSTITUTE OF TECHNOLOGY (PTY) LTD

FACULTY OF INFORMATION TECHNOLOGY


DATABASE SYSTEMS 522
2ND SEMESTER ASSIGNMENT

Name & Surname: _________________________________ ICAS No: _________________

Qualification: ______________________ Semester: _____ Module Name: ______________________

Date Submitted: ___________

ASSESSMENT CRITERIA MARK EXAMINER MODERATOR


ALLOCATION MARKS MARKS

MARKS FOR CONTENT


QUESTION ONE 40

QUESTION TWO 40

QUESTION THREE 10

TOTAL MARKS 90

MARKS FOR TECHNICAL ASPECTS


1. TABLE OF CONTENTS 2
2. LAYOUT AND SPELLING 3

3. REFERENCE 5

TOTAL MARKS 10

TOTAL MARKS FOR ASSIGNMENT 100

Examiner’s Comments:

Moderator’s Comments:

Signature of Examiner: Signature of Moderator:


QUESTIONS [90 MARKS]

QUESTION 1 40 MARKS

1.1 We have the following database schema:

Computer (vendor, model, machinetype)

Model (num, speed, ram, hd, price)

Vendor (name, address, phone)

Where vendor indicates the manufacturer of a computer, and machine type takes values such as
“desktop”, “laptop” and “server”.
⊆ Underline indicates
⊆ the primary key. Following inclusion
dependencies hold: vendor name, and model num. Express following queries in relational
algebra:

A. Find all the vendors who make laptop(s). (5)


B. Find the phone numbers of all the vendors who make desktops with speed = 2 (5)
1.2 Use the following relational schema to write relational algebra expressions for the following
queries:
Relational schema
BOOK(ISBN, Author_name, Title, Publisher, Publish Date, Pages, Notes )
STORE(Store_No, Store_Name, Street, Country, Postcode)
STOCK(ISBN, Store_No, Price, Quantity )
A. Show the names of all authors who have published books after 1st January 2008. (5)
B. List the ISBNs of all books in stock. (5)
C. Show all the stores in Belgium. (5)
D. Find the ISBN of all stores that carry a non-zero quantity of every book in the BOOK relation.(5)
E. Find the name and address of all stores that do not carry any books by ‘Cornell’. (5)
1.3 Figure 1.1 shows a set of database tables which stores information about student
assessments at Tiny University. Use the relations shown in Figure 1.1 to write relational
algebraic expressions for the following queries.
To obtain a merit in a class, students must achieve 65 or over in both coursework and exam
marks. Write a relational algebraic expression to show the names and numbers of all students
in STUDENT-1 who have achieved a merit in their classes. (5)

QUESTION 2 40 MARKS

2.1 Use Figure 1.1 to answer the following queries (40)


∏class_name(CLASS) |X| ((ASSESSMENT) |X| (∂stu_lname = ‘Vos’(STUDENT-1)))

QUESTION 3 10 MARKS

3.1 How many levels of abstraction a typical DB system should hold? What’s the purpose of each of
these abstraction levels? (10)

TOTAL: 100 MARKS

Вам также может понравиться