Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Create the necessary tables and relationships for the following scenario: The

ID: 3576598 • Letter: 1

Question

1. Create the necessary tables and relationships for the following scenario: Then populate the tables with the data provided.

Wild Life Trainers Inc. employs animal trainers who train a variety of animals for both TV and movies. The animals are categorized as either birds, mammals, or reptiles. Each animal is classified as either dangerous or harmless. You MUST decide what the primary and foreign keys should be. Use your knowledge from this class to help you. Each trainer may treat one or more animals and each animal may be trained by one, many, or not trainers at all.

Data:

TRAIRER ANIMAL

Name YEARS Experience Name Category Classification

Bill 16 Parrot Bird Dangerous

Clare 13 Python Snake Dangerous

Erica 17 Dog Mammal Harmless

Python Snake Harmless

Dog Mammal Dangerous

Rabbit Mammal Harmless

Bill trains all snakes and only snakes.

Clare trains Harmless mammals.

Erica trains Dangerous Birds

Explanation / Answer

TRAINER

trainer_id name years_experience

1 Bill 16

2 Clare 13

3 Erica 17

ANIMAL

animal_id name category classification

1 Python Snake Harmless

2 Dog Mammal Dangerous

3 Rabbit Mammal Harmless

4 Eagle Bird Dangerous

5 RattleSnake Snake Dangerous

TrainerToAnimalMap

id trainer_id animal_id

1 1 1

2 2 3

3 3 4

4 1 5

For every animal that is trained by each trainer one entry will be created in the map table.