Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In a Database Design : Camp Carlyle offers sessions in five activities: hiking,

ID: 3719142 • Letter: I

Question

In a Database Design :

Camp Carlyle offers sessions in five activities: hiking, mountain biking, horseback riding, swimming, and canoeing. The camp director has asked you to create a database to track information about campers, their parents, and the activities in which campers are participating. You need to record the leader of each activity and the location of the activity. You also need to track standard camper information (name, address, etc.) and the individual parents of the campers. Each camper must participate in only one activity. Every camper has one or more parents. Each parent may have more than one camper. You should include the parent’s place of employment and work phone.

Problem 2: Create a database design for the Camp Carlyle database, using the written format shown on page 61: TABLE (FirstColumn, SecondColumn, etc.) Show the relations, primary keys, foreign keys, and referential integrity constraints.

Explanation / Answer

If you have any doubts, please give me comment...

CREATE TABLE Camper(
    CamperID INT NOT NULL PRIMARY KEY,
    name VARCHAR(100),
    address VARCHAR(100),
    phone CHAR(15),
    activityID INT,
    FOREIGN KEY(activityID) REFERENCES Activity(activityID)
);

CREATE TABLE Parent(
    ParentID INT NOT NULL PRIMARY KEY,
    name VARCHAR(100),
    PlaceOfWork VARCHAR(100),
    WorkPhone CHAR(15)
);

CREATE TABLE CamperParents(
    CamperID INT,
    ParentID INT,
    PRIMARY KEY(CamperID, ParentID),
    FOREIGN KEY(CamperID) REFERENCES Camper(CamperID),
    FOREIGN KEY(ParentID) REFERENCES Parent(ParentID)
);

CREATE TABLE Activity(
    activityID INT NOT NULL,
    activityType VARCHAR(20)
);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote