Question: 2) Farmer Jones would like to use a relational database to keep track of his herd of cows. For each cow, we must keep track

2) Farmer Jones would like to use a relational database to keep track of his herd of cows. For each cow, we must keep track of her age, weight, and breed. He no longer names his cows (there are too many), so each cow gets a number to keep track of each cow.

a. Draw a data model for the cow table.

2) Farmer Jones would like to use a relational database to keep

b. Write the SQL necessary to create the table.

CREATE TABLE COW (

notag VARCHAR(20),

age int (2),

weight int (3)

breed VARCHAR(20),

PRIMARY KEY (notag));

3) On the Jones farm, each farmhand is assigned to take care of certain cows. For each farmhand, we must keep track of the basic biographical data (name, age, etc.) as well as the date that he or she last passed their cow care test.

a. Modify the data model created in #2 to accommodate the farmhand requirements.

b. Write SQL to create the farmhand table and modify the SQL used to create the cow

table, if necessary.

c. Write a query to determine how many cows each farmhand is responsible for.

d. Write a query to list the cows whose breed does not contain the letter m.

Cow *tagno Age Weight breed

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!