CS 361 HOMEWORK 1

 

DUE: Feb. 8, 2000

 

Use the ZOOKEEPER database located in Oracle to retrieve answers to the following questions. Each question is to be answered individually from the data in the tables : ANIMAL, FOOD, RATION and CAGE. Test your SELECT statement to assure the retrieval of the correct answer. Do not use values you have derived from prior knowledge or table viewing as part of your query. Thus, you might know Leo is a lion, but if you are to retrieve information concerning 'LEO' you may only use his name. Any query which returns food must include the units. Thus, fruit would be X LBS while grain would be X BUSHELS.

 

Save the SELECT statement for each question. When all 10 have been saved, turn the spooler on, SPOOL filename . GET each saved query and RUN it. Turn the spooler off, SPOOL OFF, then print the spool file and turn the hard copy in during class.

 

  1. List the species of animals in our zoo? (No duplicates)
  2. How many barred cages are in the zoo?
  3. What type of food do the elephants eat?
  4. How much hay does each elephant eat per week?
  5. List each type of food and the species of animal to which it is served. (No duplicates)
  6. Name the Lion that eats the most meat?
  7. List each cage type and the species which occupy cages of that type.
  8. How many female animals in the zoo?
  9. How much grain is eaten per week?
  10. What type of cage are elephants kept in?

 

If you need clarification of a question or you encounter problems, send me an E-mail message, MROBBERT.