DBF510S - DATABASE FUNDAMENTALS - 2ND OPP - JULY 2025


DBF510S - DATABASE FUNDAMENTALS - 2ND OPP - JULY 2025



1 Page 1

▲back to top


n Am I BI A u n IVER s ITY
OF SCIEnCE Ano TECHnOLOGY
FACULTY OF COMPUTING AND INFORMATICS
DEPARTMENTOF SOFTWAREENGINEERING
QUALIFICATION:BACHELOROF COMPUTER SCIENCE,BACHELOROF INFORMATICS, BACHELOR
OF CYBERSECURITY,BACHELOR OF GEOINFORMATICS, BACHELOROF LAND ADMINISTRATION
QUALIFICATIONCODE: 07BCMS,
07BAIT, 07BCCS, 07BGEI, 07BLAM
LEVEL: 5
COURSECODE: DBFSl0S
COURSENAME: DATABASE FUNDAMENTALS
SESSION:JULY 2025
DURATION: 2 HOURS
PAPER:THEORY
MARKS: 70
SECOND OPPORTUNITY /SUPPLEMENTARY EXAMINATION QUESTION PAPER
EXAMINER:
MRS SHILUMBE CHIVUNO-KURIA
MODERATOR: DR GEREONKOCHKAPUIRE
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 QUESTION PAPERCONSISTSOF~ 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 key uniquely identifies each record in a table?
a) Candidate l<ey
b) Super l<ey
c) Primary l<ey
d) Alternate l<ey
2. What does DCLstand for?
a) Data Constraint Language
b) Data Control Language
c) Database Column Language
d) Data Cursor Language
3. The number of entity types that participate in a relationship is called the:
a) number
b) identifying characteristic
c) degree
d) counter
4. What does an RDBMS consist of?
a) Collection of Records
b) Collection of l<eys
c) Collection of Tables
d) Collection of Fields
5. What does a foreign key combined with a primary key create?
a) Network model between the tables that connect them
b) Parent-Child relationship between the tables that connects them
c) One to many relationships between the tables that connect them
d) All of the mentioned
6. What is the function of the following command?
Delete from T
where Q ... ;
a) Clears entries from a relation
b) Deletes relation
c) Deletes particular tuple from relation
d) All of the mentioned
Page 11

3 Page 3

▲back to top


7. Which symbol is used for a single-character wildcard in Lll<E?
a) -
b) %
c) *
d) #
8. What does ERD stand for?
a) Entity-Relationship Design
b) Entity-Relational Diagram
c) Entity-Relationship Diagram
d) Entry Record Design
9. What is the command to change a table structure in SQL?
a) UPDATE
b) MODIFY
c) ALTER
d) RENAME
10. Which of the following
a) Update anomaly
b) Insertion anomaly
c) Deletion anomaly
d) All of the above
anomalies is caused by the insertion of redundant
data?
Question 2
[10 marks]
Indicate whether the following statements are True or False in your answer booklet.
ID Statement/Description
True False
1 The keyword SET is used to assign values in an UPDATE
statement.
2 TRUNCATE is slower than DELETE.
3 You can roll back a Data Definition Language statement.
4 A composite key consists of multiple attributes.
5 The ALTER command can be used to add columns.
6 An index on a column improves INSERT speed.
7 CHAR and VARCHAR are interchangeable.
8 2NF removes transitive dependency.
9 COUNT(*) includes NULL values in its result.
10 A full outer join returns only matching rows.
Page I 2

4 Page 4

▲back to top


SECTION B: CONCEPTS
[Marks: 10]
1. Differentiate between DELETE,TRUNCATE, and DROP commands in SQL.
[3 Marks]
2. Explain the difference between a schema and an instance in DBMS?
[2 Marks]
3. You are given the following two tables Product (ProductlD, ProductName, Quantity) and
Customer (CustomerlD, CustomerName, ProductlD}, with ProductlD as a primary key in the
Product table and a foreign key in the Customer table. Write a SQL statement that will
retrieve matched and unmatched rows from the two tables with the following resultant
columns CustomerlD, CustomerName, and ProductName.
[4 Marks]
4. Write an SQL Command that will delete all the rows from the Customer table in Q.3 above
using a DDL Command.
[1 Mark]
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. Resolve any many to many relationships if necessary.
[15 Marks]
A new private school wants to develop a database system to manage courses, students, and their
registration information. Each student can register for multiple courses and each course can have
multiple students. Each course is taught by one lecturer, but a lecturer can teach multiple
courses.
2.
Given the following table. Normalise the table to 3NF by explaining the different stages of
normalisation. Put some sample data in your tables.
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.
[13 Marks]
PatientTreatment
PatientlD
I l I PatientName Treatment
Doctor
I
DoctorPhone
PageI 3

5 Page 5

▲back to top


101
Maria
Cough,
Dr Shikongo
081-2345678
Earache
102
Thomas
Earache
Dr Van Wyk
081-9876543
3.
Write a SQL statement to create a database called PatientCare.
[1 Mark]
4.
Write a query that creates the table Patient as shown below in the PatientCare Database.
[6 Marks]
PatientlD
1001
1002
PatientName
Tina Mundia
Paul Thomas
Treatment
Cough
Earache
Doctor
Dr Solomon
Dr David
5.
Write an SQL statement to insert the rows in the table.
[3 Marks]
****** ******** *** ** ***** **** End of the Paper***********************************
Page I 4