Question: You were hired to do some data analysis for a local zoo. Below is the data table, including the necessary constraints and all the insert

You were hired to do some data analysis for a local zoo. Below is the data table, including the necessary constraints and all the insert statements to populate the database.

-- Drop all the tables to clean up

DROP TABLE Animal;

-- ACategory: Animal category 'common', 'rare', 'exotic'. May be NULL

-- TimeToFeed: Time it takes to feed the animal (hours)

CREATE TABLE Animal

(

AID NUMBER(3, 0),

AName VARCHAR2(30) NOT NULL,

ACategory VARCHAR2(18),

TimeToFeed NUMBER(4,2),

CONSTRAINT Animal_PK PRIMARY KEY(AID)

);

INSERT INTO Animal VALUES(1, 'Galapagos Penguin', 'exotic', 0.5);

INSERT INTO Animal VALUES(2, 'Emperor Penguin', 'rare', 0.75);

INSERT INTO Animal VALUES(3, 'Sri Lankan sloth bear', 'exotic', 2.5);

INSERT INTO Animal VALUES(4, 'Grizzly bear', 'common', 3.0);

INSERT INTO Animal VALUES(5, 'Giant Panda bear', 'exotic', 1.5);

INSERT INTO Animal VALUES(6, 'Florida black bear', 'rare', 1.75);

INSERT INTO Animal VALUES(7, 'Siberian tiger', 'rare', 3.5);

INSERT INTO Animal VALUES(8, 'Bengal tiger', 'common', 2.75);

INSERT INTO Animal VALUES(9, 'South China tiger', 'exotic', 2.25);

INSERT INTO Animal VALUES(10, 'Alpaca', 'common', 0.25);

INSERT INTO Animal VALUES(11, 'Llama', NULL, 3.5);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!