DBF510S - DATABASE FUNDAMENTALS - 1ST OPP - JUNE 2025


DBF510S - DATABASE FUNDAMENTALS - 1ST OPP - JUNE 2025



1 Page 1

▲back to top


n Am I BI A u n IVE Rs ITY
OF SCIEnCE Ano TECHnOLOGY
FACULTY OF COMPUTING AND INFORMATICS
DEPARTMENTOF SOFTWAREENGINEERING
QUALIFICATION:BACHELOROF COMPUTERSCIENCE,BACHELOROF INFORMATICS,BACHELOR
OF CYBERSECURITYB, ACHELOROF GEOINFORMATICS,BACHELOROF LAND ADMINISTRATION
QUALIFICATIONCODE: 07BCMS,
07BAIT, 07BCCS,07BGEI, 07BLAM
LEVEL: 5
COURSECODE: DBFSl0S
COURSENAME: DATABASEFUNDAMENTALS
SESSION:JUNE 2025
DURATION: 2 HOURS
PAPER:THEORY
MARKS: 70
FIRST OPPORTUNITY EXAMINATION QUESTION PAPER
EXAMINER:
MRS SHILUMBE CHIVUNO-KURIA
MODERATOR: DR GEREONl<OCHl<APUIRE
INSTRUCTIONS
1. Attempt all Questions.
2. All questions have to be answered in the Answer Booklet. Clearly
indicate the section and question number for each answer.
3. The allocation of marks is an indication of the extent of the expected
answer. Answering more than expected does not result in higher
marks. Keywords alone are not enough.
4. There are no books, notes or any other additional aids allowed in the
examination.
PERMISSIBLE MATERIALS
1. Examination paper
2. Examination script
THIS QUESTIONPAPERCONSISTSOF~ PAGES(Including this front page)

2 Page 2

▲back to top


Answer ALL the questions in this paper.
SECTIONA:
Question 1:
[Marks: 20]
Multiple ChoiceQuestions
[10 Marks]
• Answer all the questions in the answer booklet that has been provided.
• Select the best answer.
1. Which of the following is not a feature of DBMS?
a) Minimum Duplication and low Redundancy of Data
b) High Level of Security
c) Single-user Access only
d)Datalndependence
2. Which command is used to remove a relation in SQL?
a) Drop table
b) Delete table
c) Purge table
d) Remove table
3. ___
indicates the maximum number of entities that can be involved in a relationship.
a) Greater Entity Count
b) Minimum cardinality
c) Maximum cardinality
d) ERO
4. Which relational algebra operation is used for selection?
a) cr (sigma)
b) rc(pi)
c) x (cross product)
d) U (union)
5. Which of the following statements is true for NULL?
a) NULL= NULL
b) NULL!= NULL
c) NULL is zero
d) NULL is empty string
Page 11

3 Page 3

▲back to top


6. In the Figure below, CustomerlD in the ORDERTable is what type of key?
CUSTOMER
j
J c.,,.,....,_JNM,J,mm J c,, 'J s,... 'J zP•1
I~ 1~1 I ORDt:ALl>,'I!
Omli~
PRODUCT
I
I I P<oducL0tac'l'llon P,-JirJ,h
NQIInFlg,ro3 '12to, llmp1cl!y.
I 1 ISllll'dlltcU'rico O,uitnd •
a) Composite
b) Foreign
c) Derived
d) Primary
7. Which SQL clauses combine rows from two tables based on a related column?
a) MERGE
b) JOIN
c) INTERSECT
d) UNION
8. Which of the following is not a valid SQL data type?
a) INT
b) VARCHAR
c) FLOAT
d) TEXTBOX
9. What is the result of a CROSSJOIN?
a) Only matching rows
b) Cartesian product
c) Only unique rows
d) No rows
10. Which of the following
a) AVG
b) MIN
c) MAX
d) MULTIPLY
is NOT a valid SQL aggregate function?
Page I 2

4 Page 4

▲back to top


Question 2
[10 marks]
Indicate whether the following statements are True or False in your answer booklet.
ID Statement/Description
1 The UNION set operator removes duplicates by default.
2 Views can be used to simplify complex queries.
3 SQL commands are case-sensitive.
4 Normalisation increases data redundancy.
5 A primary key can have NULL values.
6 Indexes can speed up data retrieval.
7 Constraints enforce rules at the table level.
8 A LEFTJOIN returns unmatched rows from the right table.
9 HAVING is used after GROUP BY to filter grouped data.
10 ROLLBACK undoes all changes since the last COMMIT.
True False
SECTION B: CONCEPTS
[Marks: 10]
1. Explain the difference between a candidate key, primary key, and foreign key. [3 Marks]
2. Explain the purpose and use of the GROUP BY clause in SQL using an example. [3 Marks]
3. Given the following tables Department(DepartmentlD, DepartmentName, Location ID) and
Employee(EmployeelD, EmployeeName, DepartmentlD). Write a SQL Command that will
retrieve EmployeelD, EmployeeName and DepartmentName.
[4 Marks]
SECTION C: COMPREHENSION
[Marks: 40]
1. Given the following scenario, create an appropriate ER diagram. Include at least 3
attributes and 1 primary Key for each entity. Include the cardinality and relationships. Use
Crow's Foot Notation.
[13 Marks]
A small community library wants you to design and develop a database system to manage
books, their members, and record borrowing records. Each member may or may not
borrow many books. Each Book can have one bookloan at a time to one member.
Page I 3

5 Page 5

▲back to top


2. A business keeps track of all the Sales orders in a single table shown below.
a. What normal form is the table in? Briefly explain why you say it is in that state.
[2 Marks]
b. Normalise the table to third Normal form by briefly explaining what happens at every stage
and specify the normal form of each table with sample data.
[ 12 Marks]
OrderlD
1001
1002
CustomerName
Maria Shikongo
John Davids
Customer Address
456
Ruacana
Street
123 Popa street
ProductlD
200,300
200
ProductName
Laptop,
l<eyboard
Laptop
Quantity
1,3
2
3. Write a SQL statement to create a database called ProductSales.
[1 Mark]
4. Write SQL code to create the normalised tables in Q. 2 with the appropriate datatypes
and include the constraints. Include a foreign key in one of the tables.
[9 Marks]
5. Write a query that will insert all the rows into the tables created in Q.3.
[3 Marks]
***** ***** ***** **** ***** **** End of the Paper***********************************
Page I 4