Joins(Engineering > Computer Science And Engineering > Dbms Questions And Answers ) Questions and Answers

Question 1. What type of join is needed when you wish to include rows that do not have matching values?
  1.    Equi-join
  2.    Natural join
  3.    Outer join
  4.    All of the mentioned
Explanation:-
Answer: Option C. -> Outer join


Outer joinAn outer join does not require each record in the two joined tables to have a matching record.



Question 2. Which of the join operations do not preserve non matched tuples.
  1.    Left outer join
  2.    Right outer join
  3.    Inner join
Explanation:-
Answer: Option C. -> Inner join


Inner joinINNER JOIN: Returns all rows when there is at least one match in BOTH tables



Question 3. The____condition allows a general predicate over the relations being joined.
  1.    On
  2.    Using
  3.    Set
  4.    Where
Explanation:-
Answer: Option A. -> On


OnOn gives the condition for the join expression.



Question 4. How many tables may be included with a join?
  1.    One
  2.    Two
  3.    Three
  4.    All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned


All of the mentionedJoin can combine multiple tables.



Question 5. Which are the join types in join condition:
  1.    Cross join
  2.    Natural join
  3.    Join with USING clause
  4.    All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned


All of the mentionedThere are totally four join types in SQL.



Question 6. How many join types in join condition:
  1.    2
  2.    3
  3.    4
  4.    5
Explanation:-
Answer: Option D. -> 5


5Types are inner join,left outer join,right outer join,full join,cross join.



Question 7. Which join refers to join records from the right table that have no matching key in the left table are include in the result set:
  1.    Left outer join
  2.    Right outer join
  3.    Full outer join
  4.    Half outer join
Explanation:-
Answer: Option B. -> Right outer join


Right outer joinRIGHT OUTER JOIN: Return all rows from the right table, and the matched rows from the left table.



Question 8. In SQL the statement select * from R, S is equivalent to
  1.    Select * from R natural join S
  2.    Select * from R cross join S
  3.    Select * from R union join S
  4.    Select * from R inner join S
Explanation:-
Answer: Option B. -> Select * from R cross join S


Select * from R cross join S



Question 9. The operation which is not considered a basic operation of relational algebra is
  1.    Join
  2.    Selection
  3.    Union
  4.    Cross product
Explanation:-
Answer: Option A. -> Join


Join