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

INF2603 - 202 - 2021 Assignment 2

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

INF2603 - 202 - 2021 Assignment 2

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

INF2603/202/0/2021

Tutorial letter 202/0/2021

Databases 1
INF2603

All Semesters

ASSIGNMENT 02

School of Computing

IMPORTANT INFORMATION:
This tutorial letter contains important information
about your module.
Assignment 02 ALL TOTAL MARKS: 100

Due date Tutorial matter covered in prescribed book

14 July 2021 All chapters in the syllabus

Unique numbers Semester 1 Semester 2

681004 570719

Question 1 [28]

a. What is redundancy? What problems are associated with redundancy? (4)


b. What is a relationship? Explain what is one-to-many relationship? (4)
c. Explain what is an E-R diagram? (2)
d. What is database design? (2)
e. Use examples to compare and contrast structured and unstructured data. Which type is
more prevalent in a typical business environment? (6)
f. Define and describe the basic characteristics of a NoSQL database. (10)

Question 2 [10]

a. What is the function of the WHERE clause in SQL? Which comparison operators can you
use in a WHERE clause? (4)

b. What is a computed column? How can you use one in an SQL query? How do you assign a
name to a computed column? (6)

Question 3 [16]

NOTE: All SQL syntax must be correct, missing characters will be penalized!

2.a. Given the structure and contents of the database shown in table below, use SQL
commands to answer questions 2.a.i-v.

REPAYMENT (borrower_id, name, address, loanamount, requestdate, repayment_date,


repayment_amount)

2
INF2603/202

i. Write the SQL code that returns all the tuples with information on repayments from the
borrower with id equal to 61455, and where the lent amount exceeds R25 200.00. (4)

ii. Write the SQL code to change the loanamount of Mvelase to loanamount R6300. After you
have completed the changes, then reset the loanamount to the original amount loaned. (4)
iii. Write the SQL code that for each address finds the total repaid amount for the address. (4)
iv. Write the SQL code to delete table REPAYMENT from the database. (2)
v. What Oracle function should you use to calculate the number of days between date to
request a loan and the current date? (2)

Question 4 [21]

a. Define third normal form. What types of problems are associated with tables which are not in
in third normal form? (6)

b. Using your knowledge of the University environment, determine the functional or multivalued
dependencies that exist in the following table. After determining the functional
dependencies, convert this table to an equivalent collection of tables that are in 3rd normal
form.
Student (Student_Number, Student_Surname, Student_FName,Stud_Initial NumCredits,
AdvisorNum, Advisor_Surname, AdvisorName, Dept_Number, DeptName, (CourseNum,
CourseName, Semester, Level)) (15)

QUESTION 5 [25 marks]

Suppose you are given the following business rules to form the basis for a database design.
The database must enable the organizer of a company internship training program to mail
invitations to the program’s interns, to plan the courses, to keep track of who attends the
trainings, and so on.

• Each training serves many interns, and each intern may attend many trainings.

• An intern receives many invitations, and each invitation is mailed to many interns.

• A training is based on a single course, but a course may be used as the basis for many
3
trainings. For example, a training maybe composed of Personal Development, Soft Skills,
and Mastering Communication in a Work Place courses. Or the training maybe composed
of Ethics, POPI Act, and Online Safety courses.

• An intern may attend many trainings, and each training may be attended by many interns.

Because the organizer is not a database expert, the first attempt at creating the database uses
the structure shown below:

Sample TRAINING records:

Attribute Name Sample Value Sample Value Sample Value


INTERN_NUM I117 I305 I721
INTERN_NAME John Mahlangu Cindy Jacobs Themba Smith
INTERN_ROLE Junior Developer Associate Risk Analyst Data Capturer
INTERN_EMAIL [email protected] [email protected] [email protected]
INVITE_NUM 3 51 7
INVITE_DATE 21-Jan-2020 7-May-2020 12-Apr-2020
ACCEPT_DATE 29-Jan-2020 7-May-2020 10-May-2020
TRAINING_DATE 10-Feb-2020 16-Aug-2020 21-May-2020
TRAINING_ATTENED Yes No Yes
TRAINING_CODE T101 T771 T555
TRAINING_DESCRIPTION Orient interns about Compliance and how it Staying safe while
personal development affects the company using the company
at work resources on the
internet
COURSE_CODE PD101 COM101 E100
COURSE_NAME Introduction to Mastering Ethics
Personal Development Communication in a
Work Place: Part 1
CERTIFICATE_NUM 127324 413487 138746
CERTIFICATE_TITLE Personal Mastery Communicator at Ethics Knowledge
Work
ISSUE_DATE 10-Feb-2020 01-Sep-2020 21-May-2020

Design the conceptual data model (ERD) in Crown’s Foot notation showing all entities,
relationships and cardinalities. Include the primary key and any foreign key representations in
your design.

UNISA 2021

You might also like