You are on page 1of 4

PAGLORY UNIVERSITY

END OF TERM TWO EXAM


 ANSWER ANY THREE QUESTIONS
 NO PHONES ALLOWED
QUESTION ONE

The academic world is an interesting example of international cooperation and exchange. This
problem is concerned with modeling of a database that contains information on researchers,
academic institutions, and collaborations among researchers. A researcher can either be
employed as a professor or a lab assistant. There are three kinds of professors: Assistant,
associate, and full professors. The following should be stored: [ 20 Marks]

 For each researcher, his/her name, year of birth, and current position (if any).
 For each institution, its name, country, and inauguration year.
 For each institution, the names of its schools (e.g. School of Law, School of Business,
School of Computer Science,). A school belongs to exactly one institution.
 An employment history, including information on all employments (start and end date,
position, and what school).
 Information about co-authorships, i.e., which researchers have co-authored a research
paper. The titles of common research papers should also be stored.
 For each researcher, information on his/her highest degree (BSc, MSc or PhD), including
who was the main supervisor, and at what school.
 For each professor, information on what research projects (title, start date, and end date)
he/she is involved in, and the total amount of grant money for which he/she was the main
applicant.
a. Draw an E/R diagram for the data set described above. Make sure to indicate all
cardinality constraints specified above. The E/R diagram should not contain redundant
entity sets, relationships, or attributes. Also, use relationships whenever appropriate. If
you need to make any assumptions, include them in your answer. [20 Marks]

C BANDA 2020
PAGLORY UNIVERSITY
END OF TERM TWO EXAM
QUESTION TWO

a. What does ACID stand for? [ 10 marks]


b. What are the two basic database access operations in a transaction? [2 marks]
c. What is the purpose of system log used in a transaction processing system? [2 marks]
d. Name two transaction processing systems you may have used in your daily life? [2
marks]
e. What is the purpose of concurrency control in a transaction processing system? [4 marks]

QUESTION THREE

a) Write a SQL statement to create a database named “Mystore”. [ 5 marks]


b) Write a SQL statement to create a table named products with the following structure and
constraints: [5 marks]
Field Name Type Key
product ID INT Primary Key
name VARCHAR (255)
price$ INT
manufacturer INT Foreign Key
*The foreign key should reference to a column named manufacturer ID from a table named
manufacturer
c) Write a SQL statement to insert a row into the table created above. Use the following values:
product ID: 1, name: PS2, price: 250, manufacturer: Sony [15 marks]

C BANDA 2020
PAGLORY UNIVERSITY
END OF TERM TWO EXAM
QUESTION FOUR

You have a table with the following values: [ 20 Marks]


product ID name Price K manufacturer
1 XBOX-360 300 Microsoft
2 PS2 250 Sony
3 Nexus5X 400 Google
4 Ipad-mini 600 Apple
5 IPhone-5 1000 Apple
6 MacBookPRO 1200 Apple
7 Nexus6P 950 Google

Write SQL statements to do the following:


a. Show all records from the table [ 2 marks]
b. Show the name and price of all the products [3 marks]
c. Show the name and price of the products manufactured by Apple [5 marks]
d. Show all details of the products which have a price more than K900 [5 marks]
e. Show the names of the products which are manufactured by Apple and are expensive
than K900 [5 marks]

QUESTION FIVE

C BANDA 2020
PAGLORY UNIVERSITY
END OF TERM TWO EXAM
a. Discuss data dictionary and how it is used in database environment. [ 5 marks]
b. In order to save costs, an Internet Service Provider (ISP) hosts both the website and
the database of a company on the same web server. Discuss the disadvantage of this
decision from a security point of view. [5 marks]
c. Describe the key characteristics of a data warehouse and how it differs in content,
structure and function from an online transaction processing (OLTP) database. You
should support your discussion with suitable diagrams and examples. [10 Marks]

C BANDA 2020

You might also like