Write a query to create the zoo database. Write queries to create the tables. Be sure to include primary keys for each table and the required foreign keys and referential ntegrity actions. Add approriate indexes. This database requires at least 2 indexes in addition to those automatically created by MySQL. Add at least 5 rows to each tabl
Write a query to create the zoo database. Write queries to create the tables. Be sure to include primary keys for each table and the required foreign keys and referential ntegrity actions. Add approriate indexes. This database requires at least 2 indexes in addition to those automatically created by MySQL. Add at least 5 rows to each tabl
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 2.7CP
Related questions
Question
You've been asked to create a
Animals
This table contains the following data about all animals in the zoo.
- animal ID
- animal name
- animal birthdate
- species
- habitat
Habitats
This table contains data about the habitats in the zoo. Each animal lives in a specific habitat. The habitat table should include the following data
- habitat name
- habitat location
Exercises
Complete the following exercises to create an executable SQL script which is the physical design for this database. You should be able to execute this script to create and populate the database with test data.
- Write a query to create the zoo database.
- Write queries to create the tables. Be sure to include primary keys for each table and the required foreign keys and referential ntegrity actions.
- Add approriate indexes. This database requires at least 2 indexes in addition to those automatically created by MySQL.
- Add at least 5 rows to each table.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 6 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning