DBF510S - DATABASE FUNDAMENTALS - 1ST OPP - JUNE 2023


DBF510S - DATABASE FUNDAMENTALS - 1ST OPP - JUNE 2023



1 Page 1

▲back to top


n Am I BI A u n IVER s ITY
OF SCIEn CE Ano TECHn OLOGY
FACULTY OF COMPUTING AND INFORMATICS
DEPARTMENT OF SOFTWARE ENGINEERING
QUALIFICATION:BACHELOR OF COMPUTER SCIENCE, BACHELOR OF INFORMATICS, BACHELOR
OF CYBERSECURITY, BACHELOR OF GEOINFORMATICS, BACHELOR OF LAND ADMINISTRATION
QUALIFICATIONCODE:07BCMS, 07BAIT, 07BCCS, 07BGEI,
07BLAM, 06DPRS
LEVEL:5
COURSE:DATABASE FUNDAMENTALS
COURSECODE: DBFSl0S
DATE:JUNE 2023
PAPER:THEORY
DURATION: 2 HOURS
MARKS: 70
EXAMINER:
FIRSTOPPORTUNITYEXAMINATION QUESTION PAPER
MRS SHILUMBE CHIVUNO-KURIA
MODERATOR:
MR GEREONKOCHKAPUIRE
THIS QUESTION PAPERCONSISTSOF 5 PAGES
(Including this front page)
INSTRUCTIONSTO STUDENTS
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.

2 Page 2

▲back to top


SECTIONA:
Question 1:
[Marks: 20]
Multiple Choice Questions
[10 Marks]
• Answer all the questions in the answer booklet that has been provided.
• Select the best answer.
1. Transforming the data specifications into basic, or atomic elements following well-
established rules is called:
a) Implementation.
b) Normalization.
c) Design.
d) typing and cross-matching.
2. The three-schema approach includes which of the following schemas?
a) Internal.
b) Logical.
c) Cross-functional.
d) Dissecting.
3. A logical description of some portion of the enterprise database is called a(n):
a) Physical schema.
b) User view.
c) External schema.
d) Conceptual schema.
4. The detailed, technology independent specification of the overall structure of the
database is called the:
a) Physical schema.
b) User view.
c) External schema.
d) Conceptual schema.
5. Which ofthe following is NOT a characteristic of a good business rule?
a) Declarative.
b) Atomic.
c) Inconsistent.
d) Expressible.
6. The logical representation of an organization's data is called a(n):
a) Database model.
b) Entity-relationship model.
c) Relationship systems design.
d) Database entity diagram.

3 Page 3

▲back to top


7. The following figure shows an example of:
EMPLOYEE r==Cam=·es
=~4 I I I DEPfNDENT
a) A many-to-many relationship.
b) A strong entity and its associated weak entity.
c) A co-dependent relationship.
d) A double-walled relationship.
8. An attribute that can be calculated from related attribute values is called a(n) __
attribute.
a) Simple
b) Composite
c) Multivalued
d) Derived
9. A simultaneous relationship among the instances of three entity types is called a(n) __
relationship.
a) Ternary
b) Tertiary
c) Primary
d) Unary
10. __ is a component of the relational data model included to specify business rules to
maintain the integrity of data when they are manipulated.
a) Business rule constraint
b) Data integrity
c) Business integrity
d) Data structure
Question 2
[10 marks]
Indicate whether the following statements are True or False in your answer booklet.
ID Statement/Description
·-
1 Personal databases involve at least five computers.
2 A relationship where the minimum cardinality is one and
maximum cardinality is one is a mandatory one relationship.
3 The result of Null + 5400 is 5400.
4 A composite attribute is made up of more than one attribute.
True False
PrlPP I 7

4 Page 4

▲back to top


5 In a ternary relationship, 2 entities are normally involved while
a unary relationship involve just 3 entities.
6 The NATURAL JOIN clause is based on columns in the two
tables that have the same name and datatype.
7 SQL keywords are case sensitive.
8 Relational databases are designed to address many of the
information complexity issues.
9 The DROP TABLE statement removes the data in a table but
leaves the table structure intact.
10 Homogenous distributed databases have the same DBMS
software at multiple sites.
SECTIONB: CONCEPTS
1. Explain the following terms with an example.
a) Degree of a relationship
[Marks: 10]
[2 Marks]
b) Database Management system
[2 Marks]
c) Conceptual data model (Schema)
[2 Marks]
2. Describe the difference between the TRUNCATE and DELETEcommand.
[2 Marks]
3. Give the difference between an Inner Join and an Outer Join.
[2 Marks]
SECTIONC: 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 cardinalities and relationships. Use Crow's Foot
Notation.
[15 Marks]
A car insurance company wants to store customer information. Some of the information that the
company wants to keep track of is the customers' name, driver's license, and residential address.
They also want to store the car license, model, and year. If an accident occurs, the company needs
the accident report number, accident_location, and accident_date. Each customer can own one or
more cars. Each car can be associated with zero or more accidents. An accident can involve one or
more customers.

5 Page 5

▲back to top


2. Write an SQL query to create a table called STAFFusing the information provided in the
table below. Choose relevant datatypes and include a primary key.
[10 Marks]
Staff id
101
111
121
131
141
Last name
Tembo
Shivute
Gareses
Davids
Tumoni
First name
James
Solomon
Tina
Sarah
Tumoni
Res address
123
Thomson
street
456 Stephen
street
789 Brand
Street
147 Auas
Drive
258 Bach
street
City
Windhoek
Rundu
Otjiwarongo
Walvis Bay
Rehoboth
Phone
081123456
085271878
087380988
087917397
083889466
Join date
12-APR-00
23-OCT-06
03-AUG-10
14-JAN-12
25-JUN-09
3. Write a query to insert all the 5 rows into the table Staff as shown in Q. 1. [5 Marks]
4.
Tina has changed her residential address to '201 Simba Avenue' and the City to 'Tsumeb'.
Write a query that will modify the Staff table accordingly.
[4 Marks]
5.
Write a query to check that the changes to Tina's details have been made. [2 Marks]
6.
Write a query to remove all the rows for the Staff from the cities that start with 'R'
[4 Marks]
************** *** ** ******** * End of Exam***********************************
O-:,,n-a I 11