Question 6
AQA Computer Science June 2025 Paper 2 (7517/2)A level12 marks
On the specification
- 6.1
- 4.10 Fundamentals of databases
- 6.2
- 4.10 Fundamentals of databases
- 6.3
- 4.10 Fundamentals of databases
- 6.4
- 4.10 Fundamentals of databases
Question text
6 A school uses a relational database to store information about merits that are given to students. A merit is an award made for outstanding work or conduct. At the end of each term, prizes are awarded to the students who achieve the most merits. The database contains the four relations shown in Figure 2. Figure 2 Student(StudentID, FirstName, LastName, YearGroup, House) Teacher(TeacherID, FirstName, LastName) Merit(MeritID, StudentID, TeacherID, DateAwarded, Reason) Term(TermName, TermYear, StartDate, EndDate) The Student relation stores information about the students who attend the school. An example of the data stored about a student is: StudentID FirstName LastName YearGroup House 20965 Sophie Latham 12 Kitchener The Teacher relation stores information about the teachers who work at the school and who award merits to students. The Merit relation stores information about the merits that teachers have awarded to students, when they were awarded and for what reason. The Term relation stores information about the dates of each term. An example of the data stored about a term is: TermName TermYear StartDate EndDate Autumn 2024 04/09/2024 20/12/2024 The StudentID, TeacherID, MeritID, YearGroup and TermYear attributes are all numeric values. 6 1 box . When the Merit relation was first designed, it did not contain the MeritID field. Instead, the values in the StudentID, TeacherID and DateAwarded attributes were used together as a composite entity identifier. Describe the limitation that would have occurred if the entity identifier for the Merit relation consisted of the StudentID, TeacherID and DateAwarded attributes. [1 mark] 6.2 The diagram below shows three of the entities from the school merit database. Draw the relationships that exist between the three entities shown on the diagram. You must clearly show the degree of each relationship. [1 mark] Figure 2 is repeated below to help you answer Questions 06.3 and 06.4 without box having to turn back in the question paper. Figure 2 (repeated) Student(StudentID, FirstName, LastName, YearGroup, House) Teacher(TeacherID, FirstName, LastName) Merit(MeritID, StudentID, TeacherID, DateAwarded, Reason) Term(TermName, TermYear, StartDate, EndDate) 6.3 A new student has joined the school. The student is called Ethan Smith and their year group is 7. They are placed in Hulme house and given the StudentID number 17423. Write SQL code to add the student’s details to the Student table. [2 marks] 6 4 box . At the end of the Spring term of 2025, the school needed to identify the students who achieved merits during the term, so that prizes could be awarded to them. The dates of the term are stored in the Term table. Write a query that will list all the merits that were awarded during the term. For each merit on the list, the first name and last name of the student awarded the merit should be included, together with the reason the merit was awarded. The merits should appear on the list in order of the StudentID of the students that they were awarded to, with merits for the student with the lowest StudentID at the start of the list. [6 marks] 6.5 The merits database can be accessed on any computer within the school. It is possible that two users might try to edit the same record simultaneously. Describe how two users trying to edit the same record could cause a problem if the database system did not implement a method to manage concurrent access. [2 marks]