CS1003
MODULE TITLE:
EXAM DURATION:
2 HOURS
YOU MUST HAND IN THIS EXAM PAPER AT THE END OF THE EXAM.
DO NOT TURN OVER THIS EXAM PAPER UNTIL
YOU ARE INSTRUCTED TO DO SO.
Page 1 of 13
SECTION B
Attempt both questions in this section; each is worth 25 marks.
1.
Explain carefully how you would represent the relationship between patients
and nurses by tables in an SQL database.
[2 marks]
(d) Outline how you might represent this scenario using a document-oriented
database such as CouchDB.
[6 marks]
(e)
Page 12 of 13
[2 marks]
State whether you would use files or a relational database to implement the
following, and explain your decisions:
storage of the high score in a game
a record of modules offered by a university, and the students taking them
[4 marks]
(d) Name a mechanism that allows a Java program to interact with a relational
database using SQL, and describe briefly how it is used.
[4 marks]
(e)
Name another mechanism that allows a Java program to interact with a relational
database without using SQL, and describe briefly how it is used.
[4 marks]
(f)
(g) If you were required to implement each of the examples in part (c) using Java
and a relational database, which of the above approaches would you use, and
why?
[4 marks]
[Total marks 25]
Page 13 of 13