Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DatabaseAdministration Exam

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

THE EAST AFRICAN UNIVERSITY (TEAU)

SCHOOL OF COMPUTER SCIENCE AND IT


DEPARTMENT OF COMPUTER SCIENCE
JAN – APRIL 2019, MAIN EXAMINATION

COURSE : DATABASE ADMINISTRATION


CODE : CIT 4105
TIME : 2 Hours

INSTRUCTIONS
1. The Paper is made up of FIVE (5) Questions, question ONE is compulsory plus any other
TWO questions.
2. Credit is given for legibility, clarity of expressions and use of relevant illustrations.
3. Clearly write your registration number on each answer sheet used.

DO NOT WRITE ANYWHERE ON THIS QUESTION PAPER

QUESTION ONE:
a) List and explain any 5 types of Oracle database users. (10 marks)
b) Explain any 5 features of an Oracle Server. (10 marks)
c) Differentiate between the following:
 Oracle Database Physical Structure and Logical Structure.
 Oracle Instance user processes and Oracle processes.
 Oracle Server and an Oracle Database. (6 marks)

d) State any four benefits of Relational database management systems. (4 marks)


QUESTION TWO

 With the use of illustrations explain 5 Oracle Architectural Components. (20 marks)

QUESTION THREE
a) Using the table above, write SQL statements that achieve the following:
 Return employee details in the executive department
 Return distinct employee location_ids
 Display all details in the table ordered by location_Id in ascending order
 Return the department names of departments with location_id 1700 (8 marks)

b) Using the table above answer the following questions.


 Return last_name and job_id of employees who earn salary between 20,000 and
30,000
 Return the all details of employees who earn salary less than 15,000
 Display the details of all employees who have the job_id AD_VB
 Display distinct job_id an salaries
 Return details of all employees with the last name starting with the letter K.
 Display details of employees with salary 17000,5800 and 11000 (12 marks)

QUESTION FOUR
Employees

Departments

Using the tables above:


a) Use equijoin to retrieve join and retrieve records from the two tables (4 marks)
b) Display records using outerjoin (4 marks)
c) Explain the following:
 Cartesian product
 Left join
 Cross join
 Self join
 Outer join (8 marks)
d) Write an SQL statement that uses subqueries to return employee details of employees
whose department_id is 90 (4 marks)

QUESTION FIVE
a) Write sql queries that will do the following:
 Count the number of employees in the table
 Get the average salary of different job groups grouped by JOB_ID.(only return
two fields i.e JOB_ID and SALARY
 Return a table displaying maximum salary, minimum salary, average salary and
sum of all salaries. (6 marks)
b) Write SQL statements that will create the table above (8 marks)
c) Write DML statements that will perform the following:
 Add a new record in the table above
 Delete the record with employee_id 201
 Update the salary of the record with employee_id 205 from 12000 to 15000

(6 marks)

You might also like