Question: Question 8 ( 6 points ) Consider the following database for a summer camp: Camper ( cid , name ) Team ( gid , age

Question 8(6 points)
Consider the following database for a summer camp:
Camper(cid, name)
Team(gid,age)
Assignment(cid, gid)
Relation Camper contains a tuple for each camper with name name and unique id cid.
Each tuple in relation Team holds the unique id of a team and the age of the campers assigned to that team. Finally, table Assignment captures the assignments of campers to teams. Primary keys are underlined. Attribute "name" is a varchar. All other attributes are integer type.
NOTE: The SQL questions are graded on the logic and structure of the query. Simple syntax error will not be penalized.
Q1: (4 points) The query below was written to returns the name of all campers who have been assigned to a team.
Is this query correct? Else rewrite the query.
SELECT
C.name
FROM Camper C LEFT OUTER JOIN Assignment A
ON C.cid = A.cid
WHERE A.gid IS NULL
Q2: (2 points) Write a SQL query for the statement below:
Add the following data in Team table (23,12)
 Question 8(6 points) Consider the following database for a summer camp:

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!