A database table called Horses stores details about the horses kept at a horse sanctuary. Code Breed BreedOrigin Gender Age Arrived H002 Arabian Saudi Arabia M 5 28/09/2022 H004 Percheron France M 5 30/10/2022 H010 Friesian Netherlands M 6 15/11/2022 H011 Fjord Norway F 4 17/11/2022 H012 Clydesdale Scotland M 10 18/11/2022 H015 Arabian Saudi Arabia F 5 15/12/2022 H016 Arabian Saudi Arabia F 5 15/12/2022 H017 Clydesdale Scotland F 4 16/01/2023 H019 Percheron France M 3 16/01/2023 H025 Percheron France M 7 16/01/2023 H026 Clydesdale Scotland F 9 20/01/2023 H030 Clydesdale Scotland M 12 20/01/2023 H032 Fjord Norway M 3 24/03/2023 H033 Arabian Saudi Arabia F 15 27/04/2023 H034 Clydesdale Scotland F 4 14/06/2023 H035 Fjord Norway M 7 15/06/2023 H036 Friesian Netherlands F 15 20/07/2023 H037 Friesian Netherlands M 12 20/07/2023
- (a)State the number of records in this database table.[1]
- (b)Give the name of the field that is most suitable to be the primary key. State the reason for this choice. Field Reason[2]
- (c)The database only allows the data types: • Boolean • character • date/time • integer • real • text. Complete the table to show the most appropriate data type for each field. Each data type must be different. Field Data type Breed Gender Age Arrived[2]
- (d)Complete the structured query language (SQL) to return the code and breed of all the horses whose breed originated in Scotland. Code, Breed, FROM WHERE = "Scotland";[3]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2023). The mark or mark type is shown in brackets.
- [1] 18
- [2] One mark for the correct field name
- One mark for the correct reason
- For example: Code
- ...Each entry in this field is a unique identifier
- [2] Two marks for four correct answers.
- One mark for two or three correct answers.
- Field Data type
- Breed text
- Gender Boolean
- Age integer
- Arrived date/time
- [3] One mark for each correct answer
- SELECT
- Horses
- BreedOrigin
- Correct SQL: SELECT Code, Breed FROM Horses WHERE BreedOrigin = "Scotland";
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 →