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.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 6E
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning