Database Programming Section 6 Quiz
Database Programming Section 6 Quiz
Section 6 Quiz
(Answer all questions in this section)
Nonequijoin
Equijoin (*)
[Correct] Correct
Columns with the same names must have identical data types.
Columns with the same names must have compatible data types.
Columns with the same names must have the same precision and
datatype. (*)
3. You need to join all the rows in the EMPLOYEES table to all
the rows in the EMP_REFERENCE table. Which type of join should
you create? Mark for Review
(1) Points
An inner join
An equijoin
[Correct] Correct
4. Which of the following statements is the simplest description
of a nonequijoin? Mark for Review
(1) Points
A join condition that includes the (+) on the left hand side
[Correct] Correct
5. The keywords JOIN _____________ should be used to join
tables with the same column names but different datatypes. Mark
for Review
(1) Points
ON
NATURAL ON
USING (*)
WHEN
[Correct] Correct
6. Evaluate this SELECT statement:
SELECT a.lname || ', ' || a.fname as "Patient", b.lname || ', ' || b.fname
as "Physician", c.admission
FROM patient a
JOIN physician b
ON (b.physician_id = c.physician_id)
JOIN admission c
ON (a.patient_id = c.patient_id);
JOIN admission c
JOIN physician b
ON (a.patient_id = c.patient_id)
[Correct] Correct
7. Which of the following database design concepts do you
need in your tables to write Hierarchical queries? Mark for Review
(1) Points
Supertype
Non-Transferability
Arc
[Correct] Correct
a cross join
[Correct] Correct
9. Which select statement will return the last name and hire
date of an employee and his/ her manager for employees that started
in the company before their managers? Mark for Review
(1) Points
[Correct] Correct
(*)
SELECT p.part_id, t.product_id
FROM part p, product t
WHERE p.part_id =! t.product_id;
[Correct] Correct
11. Hierarchical queries MUST use the LEVEL pseudo column.
True or False? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
[Correct] Correct
13. What types of joins will return the unmatched values from
both tables in the join? Mark for Review
(1) Points
Natural joins
[Correct] Correct
14. You need to display all the rows (both matching and non-
matching) from both the EMPLOYEE and EMPLOYEE_HIST tables.
Which type of join would you use? Mark for Review
(1) Points
An inner join
A left outer join
[Correct] Correct
15. Which syntax would be used to retrieve all rows in both the
EMPLOYEES and DEPARTMENTS tables, even when there is no
match? Mark for Review
(1) Points