SQL CREATE TABLE `zoo`.`Habitats`( `id` INT(50) NOT NULL AUTO_INCREMENT, `habitatName` VARCHAR(50), `habitatLocation` VARCHAR(50), PRIMARY KEY (`id`) );   CREATE TABLE `zoo`.`Animal`( `animalId` INT(50) NOT NULL AUTO_INCREMENT, `animalName` VARCHAR(50), `animalBirthdate` DATE, `species` VARCHAR(50), `habiat` INT(50), PRIMARY KEY (`animalId`), FOREIGN KEY (`habiat`) REFERENCES `zoo`.`habitats`(`id`) );   Add appropriate indexes. This database requires at least 2 indexes in addition to those automatically created by MySQL.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 3.13CP
icon
Related questions
icon
Concept explainers
Question

SQL

CREATE TABLE `zoo`.`Habitats`( `id` INT(50) NOT NULL AUTO_INCREMENT, `habitatName` VARCHAR(50), `habitatLocation` VARCHAR(50), PRIMARY KEY (`id`) );

 

CREATE TABLE `zoo`.`Animal`( `animalId` INT(50) NOT NULL AUTO_INCREMENT, `animalName` VARCHAR(50), `animalBirthdate` DATE, `species` VARCHAR(50), `habiat` INT(50), PRIMARY KEY (`animalId`), FOREIGN KEY (`habiat`) REFERENCES `zoo`.`habitats`(`id`) );

 

  1. Add appropriate indexes. This database requires at least 2 indexes in addition to those automatically created by MySQL.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Query Syntax
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
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…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning