0% found this document useful (0 votes)
10 views

Database Management System (1)

The document outlines the examination details for the DIT 5127: Database Management System course at Team University for the academic year 2024/2025. It includes instructions for the exam format, sections A and B with various questions related to database concepts, SQL syntax, and practical applications. Students are required to attempt all questions in Section A and any three from Section B, covering topics such as database design, SQL commands, and relational database principles.

Uploaded by

mubiazalwa bonny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Database Management System (1)

The document outlines the examination details for the DIT 5127: Database Management System course at Team University for the academic year 2024/2025. It includes instructions for the exam format, sections A and B with various questions related to database concepts, SQL syntax, and practical applications. Students are required to attempt all questions in Section A and any three from Section B, covering topics such as database design, SQL commands, and relational database principles.

Uploaded by

mubiazalwa bonny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

TEAM UNIVERSITY EXAMINATION BOARD

FACULITY OF INFORMATION TECHNOLOGY


DIPLOMA PROGRAMMES
DIT 5127: DATABASE MANAGEMENT SYSTEM
DIPLOMA IN INFORMATION TECHNOLOGY
ACADEMIC YEAR 2024/2025: December 2024 END OF SEMESTER EXAMINATIONS

YEAR 2 SEMESTER 2
DATE: 6TH/DEC/2024 TIME: 2:00PM – 5:00 PM

INSTRUCTIONS:
1. Attempt All in section A and any Three Questions in section B
2. All Questions In Section B Carry Equal Marks
3. Time allowed: 3 HRS
SECTION A
Attempt all the questions in this section
Question 1
In that database environment there are many players from creation to usage.
a) Explain the roles in the database environment (10 Marks)
b) Write the oracle syntax for an inner join (5 marks)
c) What are the uses of (@2 marks)
i. Data definition Language (DDL)
ii. Data Manipulation Language (DML)
d) What is a database? (1 mark)
Question 2
a) You are required to design a database for your company that has employed you as the
database administrator. Explain the different models that you will apply to design the
database (10 marks)
b) Write the sql syntax for an inner join (5 marks)
c) Explain 5 Characteristics of good information (5 marks)

SECTION B
1
Attempt any three Questions
Question 3
Study the tables given below:
Branch
branch No Street City postcode
B005 22 Deer Rd London SW1 4EH
B007 16 Argyll St Aberdeen AB2 3SU
B003 163 Main St Glasgow G11 0QX
B004 32 Manse Rd Bristol BS99 1NZ
B002 56 Clover Dr London NW10 6EU

Staff

staff No FName lName position Sex DOB Salary branchNo


SL21 John White Manager M 1-Oct-45 30000 B005
SG37 Ann Beech Assistant F 10-Nov-60 12000 B003
SG14 David Ford Supervisor M 24-Mar-58 18000 B003
SA9 Mary Howe Assistant F 19-Feb-70 9000 B007
SG5 Susan Brand Manager F 3-Jun-40 24000 B003
SL41 Julie Lee Assistant F 13-Jun-65 9000 B005

a. SELECT staff.fname, staff.lname, branch.branchno, branch.street, branch.city,


branch.postcode FROM staff inner join branch ON (staff.branchno = branch.branchno).
Draw the resultant table. (5
Marks)
b. Write SQL statements to do the following; (3 mark@)
i. Create a database
ii. Create a table
iii. Show tables in the database
iv. Select all data from the table you have created
c) The database Development lifecycle consists of 11 steps, explain briefly these steps (13
Marks)
Question 4
a) You are hired to be the database administrator of Team University. You are required to
design the database that captures the student’s details such as Registration number, Name,
course, year of study and semester and then insert the required data in the database. Write
down all the SQL statements that will help you achieve the above task.(Registration number
is the primary key, all attributes should not be null) use table constraints
(10 marks)

2
b) What is the Limitations of File-based Approach in relation to databases? (5 Marks)

c) What are the challenges/Limitations of the manual filing system? (5marks)


Question 5
Propertyforrent
propertyNo street city postcode type rooms Rent ownerNo staffNo branchNo
PA14 16 Holhead Aberdeen AB7 55U House 6 650 CO46 SA9 B007
PL94 6 Argyll St London NW2 Flat 4 400 CO86 SL41 B005
PG4 6 Lawrence St Glasgow G11 9QX Flat 3 350 CO40 B003
PG36 2 Manor Rd Glasgow G32 4QX Flat 3 375 CO93 SG37 B003
PG21 18 Dale Rd Glasgow G12 House 5 600 CO87 SG37 B003
PG16 5 Novar Dr Glasgow G12 9AX Flat 4 450 CO93 SG14 B003
i. Write the SQL statement to insert data into the table propertyforrent (6 Marks)
ii. Write sql statements to log onto the sql server (2 Marks)
iii. Write sql statement to change number of rooms of the data inserted in(i) above to 5
(2 marks)
iv. Write sql statement to remove the attribute rooms from the relation propertyforrent
(2 marks)
Consider the table below:
Staff
StaffName FName Surname Date_of_Birth Years_Worked

1 Duke Stanley 26-Nov-1980 3


2 Richard Williams 13-Dec-1983 2
3 Andrew Brainhard 02-Feb-1979 1
4 Ronald Dickson 06-Feb-1979 3
5 Charlotte Bronte 12-Jun-1982 1
6 Christabel Maryson 14-Jul-1981 3
7 Rosette Williams 20-Aug-1981 3
8 Clarissa Gravestone 11-Aug-1980 2
9 Michael Williams 23-Jan-1979 3

i) If one needs to add a column called Salary to the table and remove the Date_of_Birth
column from the table, Supply the SQL codes for these is operations. (4 Marks)
ii) Write SQL code to list the staff who have worked for at least of two years. (2 Marks)

3
iii) Write SQL commands to add two rows to the original version of the table above with
your own data. (2
Marks)
Question 6
a) What is the manual filling system? Give 4 advantages (5 marks)
b) The relational database model has been our major point of study. Clearly explain
what these the following terms mean in regards to the relational database model.
(5
marks)
-Relation
-Attribute
-Tuple
-Cell
-Domain
-Primary key

c) List 2 Examples of DDL SQL statements (2 marks)


staffNo FName lName Position Sex DOB Salary branchNo
SL21 John White Manager M 1-Oct-45 30000 B005
SG37 Ann Beech Assistant F 10-Nov-60 12000 B003
SG14 David Ford Supervisor M 24-Mar-58 18000 B003
SA9 Mary Howe Assistant F 19-Feb-70 9000 B007
SG5 Susan Brand Manager F 3-Jun-40 24000 B003
SL41 Julie Lee Assistant F 13-Jun-65 9000 B005
For the questions below, use tuple calculus to attempt them
d) List the names of all managers who earn more than £25,000 (2 Marks)
e) List the staff who manage properties for rent in Glasgow. (2 marks)
f) List the deMorgan’s laws (4 marks)
Question 7
Given the table below, use it to answer questions below

4
StaffNo FName Surname Date_of_Birth Years_Worked a)
Wha
1 Duke Stanley 26-Nov-1980 3
2 Richard Williams 13-Dec-1983 2
3 Andrew Brainhard 02-Feb-1979 1
4 Ronald Dickson 06-Feb-1979 3
5 Charlotte Bronte 12-Jun-1982 1
6 Christabel Maryson 14-Jul-1981 3
7 Rosette Williams 20-Aug-1981 3
8 Clarissa Gravestone 11-Aug-1980 2
9 Michael Williams 23-Jan-1979 3

t is the cardinality of this table? (2 marks)


b) What is the degree of this table? (2 marks)
c) Explain 4 Properties of Relations/ Files (4 marks)
Given the relation below: use it to answer the questions below

Branch

Property Forrent

5
Write the relational algebra for the following statements given the relations below:
i) salary > 10000 (Staff) (skram3)
ii) PfName, lName, salary (Staff) (skram3)
iii) List all cities where there is either a branch office or a property for rent. (3 marks)
iv) List all cities where there is a branch office but no properties for rent. (3 marks)
End

You might also like