Questions 1–6 relate to the following tables. For question 1, assume that the tables do not yet exist. For question 2, assume that the tables exist but have not yet been populated with any data. Otherwise, assume that the tables have been populated with the data values shown.
1. Write CREATE statements for the animal, keeper, supervision and eats tables. Choose suitable data type declarations for the columns.
2. Write INSERT statements to put the first two rows into the animal table.
3. Write down the table occurrences generated by each of the following:
(a) SELECT keeper_name FROM keeper
(b) SELECT DISTINCT food FROM eats
(c) SELECT animal_name FROM eats WHERE food = 'hay' OR food = 'people'
(d) SELECT animal_name, keeper_no FROM supervision WHERE keeper_no > '100'
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here