预定/报价
数据库代写|COMP0022 Database and Information Management Systems
阿叶2024-05-14 15:34:20
留学生作业代写do not hesitate to contact me!
WeChat:lovexc60


There are FOUR questions in total.

Answer All FOUR questions.

Marks for each part of each question are indicated in square brackets [ n].

Standard calculators are permitted.

Consider a database that records details about school students, their exam entries and exams:

Students(studentID. firstname, familyname, address, borough)

Entries(studentID, examID. mark, result)

Exams(exam ID, subject, qualification, board, date)

(a)Write a SQL query on this database to find all students living in the borough of Haringey whose result was a pass where the subject was Maths. Your query should use two joins and no sub-query.  [4 marks]

(b)Re-express the query from (i) in relational algebra where the joins are performed on the tables before the tables are reduced by the selection operators.   [4 marks]

(c)Calculate the cost of processing the query in terms of disc accesses if you assume the following statistics ( nb. answers may not need all of these statistics):

10 rows are in the Students table.

100 rows are in the Entries table.

10 rows in the Entries table are for the Maths exam.

15 rows are in the Exams table.

1 exam has the subject ‘Maths’.

80 exam entries have a ‘pass’ result.

There were 8 passes of the Maths exam.