Professional Documents
Culture Documents
DATABASE_MANAGEMENT_SYSTEMS_1_
DATABASE_MANAGEMENT_SYSTEMS_1_
DATABASE_MANAGEMENT_SYSTEMS_1_
PROGRAMME(S): DIT,BIT,BCS,BSF
SESSION: DAY/EVENING
MODULE CODE AND TITLE: LEVEL:
2108,2101 DATABASE 1.2
MANAGEMENT SYSTEMS 1
DATE: TIME:
JUNE, 2024
DURATION: TOTALMARKS:
6 Hours 100
EXAMINER/LECTURER: MODERATOR:
Mr. Wakale Fazali Ms. Lillian Tamale
1
Section A (Compulsory)
QUESTION ONE: (25Marks)
The Ministry of ICT and National Guidance is expected to deliver its proposed budget for the
financial year 2024/2025. The information needed from the ministry in order to be considered
by the ministry of Finance for funding include; the department IDS, department names, number
of employees in those departments and the anticipated budget for each department. course
admitted to. The student DepartmentID is an integer and should not exceed 10 characters, the
integer not exceeding 3 characters while the Annual budget field is varchar and should have 10
Required
2
Using SQL,
i. Create a database called “Ministry of ICT” (3 marks)
ii. Create a table called “proposed budget for the ministry” with the highlighted constraints
(4 marks)
iii. Insert the above Department details in the table created. (8 marks)
iv. The minister in charge of the ministry would like to know the total amount of money
proposed for financing by the ministry, issue an SQL statement that can enable him to
achieve this (5 marks).
v. The name Anual budget in the table inserted has been misspelt, change the above name
to Annual budget (5 marks)
The International Telecommunications Union (ITU) reports that more than 50% of the world’s women
are offline thus not using any form of modern data storage techniques to aid them in their businesses.
This is more pronounced in developing countries like Uganda, where the internet penetration rate for
adult women is 41%, compared to 53% for men. With this limited penetration of the internet, few
women can use online database systems to store their data. The Global System for Mobile
Communications Association (GSMA) found that 393 million adult women in developing countries do
not own mobile phones, and globally, women are 8% less likely to own a mobile phone than men. This
therefore means that a few women use database management systems to store their data. The gender
gap in mobile ownership in sub-Saharan Africa is 13%. Women are more likely than men to borrow or
share mobile phones (often within a household or from a male family member) and are rarely the
primary owners of a mobile device. GSMA further reports that women are more likely to have simpler
feature phones that do not support mobile internet use, and women are 20% less likely than men to own
a smartphone.
This therefore calls for skilling of women in data management to enhance their understanding of
business management techniques.
As a person who has studied database management systems,
i. Explain to the women with an illustration the layered architecture and the concept of
data mapping used during database design(13 marks)
3
ii. Almost all women in Uganda engaging in business use a file based form of storing data,
convince these women why they need to move from such a form of storing data to the
relational type. (12 marks)
Mr Uhuru recently visited United Arab Emirates in 2023 and liked the meals served in that
country. Upon return to Uganda, Mr uhuru started a risky venture of opening up an Arabic
restaurant in kampala. This restaurant sales 3 dishes; Khameer,Chebab and Regag.
The restaurant has captured some basic data from their few months of operation. This data is
divided in three datasets; sales, menus and members . the data sets are as set below
Sales Table
4
product_id product_name price
1 Khameer, 28,000
2 Regag. 35,000
3 Chebab 23,000
customer_id order_date product_id
C 2021-01-07 3
customer_id join_date
A 2021-01-07
B 2021-01-09
ii. How many days has each customer visited the restaurant?(4 marks)
iii. What is the most purchased item on the menu and how many times was it purchased
iv. Which item was the most popular for each customer?(4 marks)
v. Which item was purchased first by the customer after they became a member?(3
marks)
vi. Which item was purchased just before the customer became a member?(4 marks)
5
QUESTION FOUR: (25Marks)
Entity relational diagrams are a very important aspect in database management systems, a
person who would like to come up with a good database ought to start with having good entity
relational diagrams
With clear examples, Explain the following terms as used in entity relation diagrams (5 marks
each)
i. Specialization
ii. Foreign key and primary key
iii. Composite attributes and Multivalued attributes
iv. Generalization
v. Relational model and relational constraints
With the information provided above, use relational algebra to answer the questions below
i. Find all loans of over 2,000,000 (4 Marks)
ii. Find the loan number for each loan of an amount greater than 1,000,000. (4 Marks)
iii. Find the names of all customers who have a loan, an account, or both from the bank.
5marks
iv. Find the names of all customers who have a loan and an account at bank. (4 Marks)
6
v. Find the names of all customers who have a loan at the Masaka branch. (4 Marks)
vi. Find the names of all customers who have a loan at the Masaka branch but do not have
an account at any branch of the bank. (4 Marks)
Required
i. Create database called imperial Hotel and a table called Guests (5 marks)
ii. Make GNO to be the primary key of the table with a maximum of four characters (2
marks)
iii. Populate the table as seen above (5 marks)
iv. Create query that will display all guests who are not in the vip rooms (3 marks)
v. Create a query which will display all the guests who are either Kenyan or Tanzanian
nationals (3 marks)
vi. Create a query to display all the quests whose accommodation fee is below 90000 (3
marks)
vii. Create a query to display all guests whose accommodation fee is above 80000 but below
120000 (4 marks)