Review

Read each question below. Select the Best answer from the options presented. In Codio you will only be given one opportunity to answer each question.
Q1. This is a type of join where the Primary Key in one table has to equal the Foreign Key in another table in order for rows to appear in the result set.
  • Subquery
  • Non-Equi Join
  • Set Operator
  • Equi Join

Answer

Equi Join

Q2. When performing an Inner join we can join our tables in the _____.

  • from and where clause
  • where and order by clause
  • select and from clause
  • select and where clause

Answer

from and where clause

Q3. What is the major reason why we test our joins when forming an Inner Join?

  • We want to make sure we are avoiding a Cartesian Product.
  • We want to make sure we are avoiding a join using the WHERE clause.
  • We want to make sure we are avoiding a Non-Equi join
  • We want to make sure we are avoiding a join using the GROUP BY clause.

Answer

We want to make sure we are avoiding a Cartesian Product.

Q4. Using the Auntie B database and the blocks listed below, create an Inner join between the Item and the Item_Type tables. List the Item table first in your answer. Additionally when forming the join list the Primary Key column first.

Construct your solution here

from
Item
join
Item_Type
on
Item.ItemTypeID
=
Item_Type.ItemTypeID

Q5. Using the Auntie B database create an Inner Join between the Charity, Donation and Item_Donation tables. Make sure you list the Charity table first and follow the path on the ERD. Additionally when forming the join list the Primary Key column first.

Construct your solution here

from
Charity
join
Donation
on
Charity.CharityID
=
Donation.CharityID
join
Item_Donation
on
Donation.DonationID
=
Item_Donation.DonationID