DPG621S - DATABASE PROGRAMMING THEORY - 1ST OPP - NOV 2022


DPG621S - DATABASE PROGRAMMING THEORY - 1ST OPP - NOV 2022



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
SCHOOL OF COMPUTING
DEPARTMENTOF SOFTWAREENGINEERING
QUALIFICATION: BACHELOROF COMPUTERSCIENCE;BACHELOROF INFORMATICS;BACHELOR
OF GEOINFORMATION TECHNOLOGY
QUALIFICATION CODE: 07BCMS; 07BACS
07BAIT; 07BAIF; 0701TB
LEVEL: 6
COURSE: DATABASEPROGRAMMING
COURSE CODE: DPG621S
DATE: NOVEMBER 2022
SESSION: 1 (THEORY)
DURATION: 1 HOUR
MARKS: 40
EXAMINER:
MODERATOR:
FIRST OPPORTUNITY EXAMINATION QUESTION PAPER
MR GEREONKOCH KAPUIRE
PROFJOSEQUENUM
THIS QUESTION PAPER CONSISTS OF 2 PAGES
(Excluding this front page)
INSTRUCTIONS
1. Answer all questions.
2.
When writing take the following into account: The style should inform than impress, it
should be formal, in third person, paragraphs set out according to ideas or issues and
the paragraphs flow in a logical order. The information provided should be brief and
accurate.
3.
Please, ensure that your writing is legible, neat and presentable.

2 Page 2

▲back to top


..

3 Page 3

▲back to top


Section A- Theory (40 Marks}
Question 1
Choose True or False
(10 Marks]
No
Questions
1
Each transaction is implicitly started with the BEGIN
TRANSACTION
2
DCL triggers respond to server and database events such as
CREATETABLE and DROPTABLE statements.
3
Server databases are designed to serve limited users at a
time
4
ROLLBACKTRANSACTION rolls back an explicit transaction to
the end of the transaction
5
Primary data file constructs a SQL Server database
6 Stored procedures can have a single integer return value
7 sp_rename allows to rename of objects
8
Output parameters are used to return a value like a function
9 The ALTERTRIGGERstatement creates a stored trigger
True (T}
False (F}
10 Once a stored procedure is dropped its content is still saved
Question 2
Compare and explain the difference between the two statements.
Statement 1:
Execute add_employee '1','Chantelle','Van Wyk','Ms','2000','Female'
Statement 2:
Execute add_employee
Question 3
Compare and explain the difference between the two statements.
Statement 1:
CREATEPROCEDUREadd_employee_with_parameters
Statement 2:
ALTER PROCEDUREadd_employee_with_parameters
Question 4
Compare and explain the difference between the two statements.
Statement 1:
CREATEPROCEDUREadd_employee
AS
2
(4 Marks]
(4 Marks]
(4 Marks]

4 Page 4

▲back to top


5 Page 5

▲back to top


DECLARE@Employee_ld varchar{25)
Statement 2:
CREATEPROCEDUREadd_employee
@Employee_ld varchar{25)
Question 5
Explain the usefulness of transactions.
[4 Marks]
Question 6
[2 Marks]
If you are a Database Developer, you have the option to either use a trigger or a procedure.
When would it be applicable to use a stored procedure? Can you please share two advantages
of using a stored procedure?
Question 7
Can you please explain what a cursor is in databases?
[2 Marks]
Question 8
[2 Marks]
As a Senior Database Developer at ABCTechnology, you always educate your Junior Database
Developers that they must be careful when writing triggers for a database. Can you name four
problems that could be encountered?
Question 9 .
[4 Marks]
You are employed by ABCTechnology as a Database Developer. You get invited to present the
topic "Database Development in the modern space" to university students. During the QA, one
student wants you to explain the difference between a variable and a parameter. What would
your reply be?
Question 10
[4 Marks]
What is the difference between COMMIT TRANSACTIONand COMMIT TRANSACTION?
<<<<<<End of Exam »>>>
3

6 Page 6

▲back to top


nRmlBIA
Un!VERSITY
or-St;lEnCE Af10
TEO-!nCLOGY
P/i3ag133!l8
Wi:idhoek
NAMIBIA
2022-10-18
FACULTYOFCOMPUTIN&GINFORMATICS
DEPARTMENCT:OMPUTESRCIENCE