A library uses a database table, GENRE, to keep a record of the number of books it has in each genre. ID | GenreName | Total | Available | Loaned | Overdue ---|---|---|---|---|--- ABI | Autobiography | 500 | 250 | 250 | 20 BIO | Biography | 650 | 400 | 250 | 0 EDU | Education | 20200 | 10000 | 10200 | 1250 FAN | Fantasy | 1575 | 500 | 1075 | 13 GFI | General Fiction | 35253 | 23520 | 11733 | 0 GNF | General Non-Fiction | 25200 | 12020 | 13180 | 0 HFI | Historical Fiction | 6300 | 3500 | 2800 | 0 HNF | Historical Non-Fiction | 8000 | 1523 | 6477 | 0 HUM | Humour | 13500 | 9580 | 3920 | 46 MYS | Mystery | 26000 | 13269 | 12731 | 0 PFI | Political Fiction | 23561 | 10523 | 13038 | 500 PNF | Political Non-Fiction | 1823 | 750 | 1073 | 23 REF | Reference | 374 | 374 | 0 | 0 ROM | Romance | 18269 | 16800 | 1469 | 0 SAT | Satirical | 23567 | 12500 | 11067 | 0 SCF | Science Fiction | 36025 | 25000 | 11025 | 0 SPO | Sport | 45720 | 32687 | 13033 | 3256 THR | Thriller | 86000 | 46859 | 39141 | 0
- (a)State the reason ID could be used as a primary key in the table GENRE.[1]
- (b)State the number of records in the table GENRE.[1]
- (c)Complete the query-by-example grid to display any genres with overdue books. Only display the ID, GenreName and Overdue fields in order of the number of books overdue from largest to smallest.[4]
Mark scheme
Marking points from the official mark scheme (May/June 2021). The mark or mark type is shown in brackets.
- [1] The data in the ID column/field is unique/not repeated in each row/record
- [1] 18
- [1] Correct fields present and correctly named (ID, GenreName, Overdue)
- [1] Correct table name (GENRE) and show box ticked in all columns
- [1] Correct sorting (Overdue, Descending)
- [1] Correct search criterion (Overdue > 0)
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →