Design and Create a database for a dog show. Each dog has a breed, a category, a
ID: 3910319 • Letter: D
Question
Design and Create a database for a dog show.
Each dog has a breed, a category, and a handler and some descriptive data.
Handler's have names, gender, addresses, etc. A handler may handle more than one dog.
Breeds fall into one of the following categories
Group 1, Sporting Dogs.
Group 2, Hounds.
Group 3, Working Dogs.
Group 4, Terriers.
Group 5, Toys.
Group 6, Non-Sporting.
Group 7, Herding.
Each contest has a win, place, and show (1st, 2nd, 3rd)
Each dog participates in a contest that is restricted to it's own category
Each contest has three judges. The judges each judge 2 contests but no more. A judge cannot be handler.
Explanation / Answer
Table design :
Dog
( dog_id , breed_name , category , handler_id )
Handler
( handler_id ,handler_name , gender address ,city ,zip , ph_no )
Category
( category_name , handler_name )
Contest
( contest_id ,win , place , show_no )
Judges
( contest_id , judge1 , judge2 )
Participants
( dog_id , category_id , contest_id )
CREATE table command :
Dog table
CREATE TABLE Dog (
dog_id int,
breed_name varchar(255),
category varchar(255),
handler_id int
);
Handler table
CREATE TABLE Handler (
handler_id int,
handler_name varchar(255),
gender varchar(255),
address varchar(255),
city varchar(255),
zip varchar(255),
ph_no int
);
Category table
CREATE TABLE Category (
category_name varchar(255),
handler_name varchar(255)
);
Contest table
CREATE TABLE Contest (
contest_id int,
win varchar(255),
place int,
show_no varchar(255)
);
Judge table
CREATE TABLE Judges (
contest_id int,
judge1 varchar(255),
judge2 varchar(255)
);
Participants table
CREATE TABLE Participants (
dog_id int,
category_id int,
contest_id int
);
*************************END******************PLS GIVE ME GOOD RATING****************
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.