#### 联系方式

• QQ：99515681
• 邮箱：99515681@qq.com
• 工作时间：8:00-23:00
• 微信：codinghelp

#### 您当前位置：首页 >> Database作业Database作业

###### 日期：2020-12-14 10:50

Wednesday 11 December 2019

1.00 pm – 2.30 pm

(Duration: 1 hour 30 minutes)

DEGREES of MSci, MEng, BEng, BSc, MA and MA (Social Sciences)

COMPUTING SCIENCE CS1F

This examination paper is worth a total of 50 marks

(Use SEPARATE ANSWER BOOKS for sections A & B)

The use of a calculator is not permitted in this examination

INSTRUCTIONS TO INVIGILATORS

Please collect all exam question papers and exam

answer scripts and retain for school to collect.

Candidates must not remove exam question papers.

December Diet 1 Continued Overleaf/

1. (a) Provide descriptions of any three of the following. You must use examples and/or

[9]

(i) A many-to-many relationship in an ER diagram, and how it is mapped to

relations.

(ii) The projection and selection operations in relational algebra, and their

effects when applied to a relation.

(iii) The grouping SQL design pattern.

(iv) The degree and cardinality of a relation.

(v) A Primary key of a relation.

(vi) The Relational Algebra ? operation

(b) University staff can either be academics or researchers; each researcher must be

supervised by an academic; similarly each academic must be managed by another

academic – in both cases, each academic can supervise/manage more than one

researcher/academic. Staff are formed into teams – each team must have an

each member of staff can belong to more than one team. Finally, each team has

multiple associated projects, where each project has a title and is allocated a

number starting from 1 for each team.

University staff are identified uniquely by a staff number, with first and last name

attributes. Academics also have a job-title. Teams are uniquely identified by their

team name.

(i) Design an ER diagram for this scenario.

[7]

(ii) Specify the resulting relational database schema, clearly indicating primary

and foreign keys.

[3]

(c) Consider the following relational database, which describes the data held by a

library concerning the authorship of their books, and which comprises details of

books, and their authors.

Book(ISBN, Title, Genre, Price, Publisher, Published)

Author(AuthorNum, Name, Pseudonym)

Write(ISBN, AuthorNum)

Moreover, there exist foreign key constraints as follows:

December Diet 2 Continued Overleaf/

Book.Publisher refers to Publisher.Name

(i) Express the following query in relational algebra:

Get the titles of the books published since 1st Jan 2014 that cost more than ￡5.

[1]

(ii) Express the following query in SQL:

Get the titles of all of the books in the library written by “J. K. Rowling”

[2]

(iii) Express the following query in SQL:

Get the average price of books in the library for each publisher.

[2]

(d) Given A = {x,y} and B = {0,2,7}, list the elements of the Cartesian product of the

two sets A and B.

[1]

December Diet 3 /END

2. This question is about qualitative evaluation techniques and ethics.

Consider the following scenario. You are completing a user study on how people

use a self-checkout in a grocery store.

(a) For the scenario above, consider using an interview method. What kind of

interview would you complete and why?

[3]

(b) For the scenario above, give an example of a close-ended and open-ended question

[4]

(c) For the scenario above, describe how you would analyse the results of your

interview study.

[3]

(d) For the scenario above, what is one reason why you might also gather observational

data on how people use a self-checkout in a grocery store?

[2]

(e) For the scenario above, give an example of bias that might change your results.

Discuss steps you might take to mitigate that bias.

[4]

(f) Describe what “informed consent” means and give an example of a situation where

users may not be giving informed consent.

[3]

(g) There are four key aspects of informed consent. Give two of these and describe

why they are important.

[6]