0% found this document useful (0 votes)
11 views3 pages

DBMS

These is a research paper of the database systems that cam be used by students.

Uploaded by

feliciaakosa1
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)
11 views3 pages

DBMS

These is a research paper of the database systems that cam be used by students.

Uploaded by

feliciaakosa1
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/ 3

UNIVERSITY EXAMINATIONS: 2023/2024

EXAMINATION FOR THE DEGREES OF BACHELOR OF SCIENCE IN


SOFTWARE DEVELOPMENT/BUSINESS INFORMATION
TECHNOLOGY/INFORMATION TECHNOLOGY
BIT 2104, BBIT 2104, BAC 1301, BSD 1306, BISF 1301:
DATABASE DESIGN & DEVELOPMENT
ORDINARY EXAMINATIONS
FULL TIME/PART TIME/DISTANCE LEARNING
DATE: DECEMBER, 2023 TIME: 2 HOURS
INSTRUCTIONS: Question One Is Compulsory, Choose Two Other Questions

QUESTION ONE (20 Marks) Compulsory

a) Table 1 below is an extract from a patient management system. Study the table carefully and
answer the questions that follow.

PATIENT table

PatientId FirstName LastName Age Gender Disease


12/0012 Anita Musyoki 23 F Malaria
12/0013 Tifanny Musyoki 22 F Malaria
12/0014 Tifanny Nganga 21 F Malaria
12/0015 David Nganga 23 M Malaria
12/0016 David Mwangi 23 M Malaria
12/0017 John Kimani 23 M Diabetes
12/0018 John Mutua 22 M Diabetes
13/0012 Alvin Kamau 24 M Pneumonia
12/0013 Daniel Onyancha 27 M Hypertension
13/0013 Ruth Attogo 25 F Hypertension
14/0014 Ritah Wekesa 25 F Amoeba
14/0015 Mike Mbugua 30 M Amoeba
Table 1
Required: -Write SQL statements that:
i. Display all patients who have Hypertension or Amoeba. (2 Marks)
ii. Display patients who are not suffering from Diabetes (2 Marks)
iii. Display patient’s name, age and the disease they are suffering from in ascending
order. (2 Marks)
iv. Insert a new column in Patients table named doctor whose data type is varchar
and the length is 100. (3 Marks)

b) Figure 1 below is an extract of registration form used by students at KCA University for
course enrolment.

Student Number:19/006
Name:Janet Atieno
Address:304 Kisumu
courseCode course_Title lecturerName LecturerNumber
DBIT 301 DBMS Kamau Njoroge K002
DIT 301 OS Njoroge Kamau K300
Figure 1
Required: -
(i) Explain the term “normalization” as used in database design [1 Mark]
(ii) Using the information provided on figure 1 above, normalize the form data to the 3rd
Normal form [7 Marks]
c) Giving suitable examples in each case, Explain the following terms as used in database design
and development: - [3 Marks]
(i) Foreign key
(ii) Primary key
(iii)Candidate key

QUESTION TWO (15 MARKS)


Study the scenario given below and answer the questions that follows:
A student can take only one course at a time. A lecturer can teach many students. A course must
belong to a faculty. A lecturer can belong to only one department though can teach in several
faculties.
Required:
(i) Identify the entities and their attributes from the above scenario (2 Marks)
(ii) Draw an Entity Relationship diagram to depict the information in the above scenario.
(6 Marks)
a). Explain hierarchical database and discuss its advantages and disadvantages. (3 Marks)
b). State four properties of relational tables. (4 Marks)
QUESTION THREE (15 MARKS)
a). Write an SQL code for a table called students in a database called University. The students
table should have the following columns: StudentID, FirstName, LastName, gender, DOB,
and city. Set the primary key and it should not be null. (6 Marks)
b). Write an SQL to insert at least 3 records in the above students table (4 Marks)
c). Highlight five important database security features (5 Marks)

QUESTION FOUR (15 MARKS)


a) When designing a database there are 3 types of relationships you need to be aware of.
Discuss providing relevant examples of each (9 Marks)
b) When preparing a database, we need to show how data is stored, connected, accessed and
updated. Discuss the three types of data models in DBMS used to accomplish this
(6 Marks)

You might also like