Page 77 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 77

Database Management Systems/Managing Database




                    Notes          4.8 Self Assessment

                                   Fill in the blanks:
                                   1.  You  can  combine  different  query  blocks  into  a  single  query  expression  with  the
                                       .............................. operator.
                                   2.  A subquery is always a single query block .............................. that can contain other subqueries
                                       but cannot contain a UNION.

                                   3.  A view can be dropped using a .............................. statement.
                                   4.  .............................. are useful for security of data.
                                   5.  .............................. are used to query data from two or more tables, based on a relationship
                                       between certain columns in these tables.
                                   6.  An .............................. cannot be nested inside a Left Join or Right Join.
                                   7.  .............................. combines two tables based on their common columns.

                                   8.  Subqueries are similar to SELECT ..............................
                                   9.  The .............................. clause should follow the GROUP BY clause.
                                   10.  A query inside a query is called as .............................. query.

                                   4.9 Review Questions

                                   1.  Create a table with five columns and apply subqueries concept on that table.
                                   2.  You already create a table in question no. 1, then apply SQL IN concept on that table with
                                       suitable example.
                                   3.  What do you mean by ORDER BY clause? Apply this clause with a suitable example.
                                   4.  Explain UNION clause in detail with the help of example.

                                   5.  How will you drop views? Explain with suitable example.
                                   6.  What is the purpose of joins in SQL? Explain inner join.
                                   7.  Create a table name student with five important column and apply order by and having
                                       clause on it.
                                   8.  What do you mean by complex queries?
                                   9.  How will you drop a view? Explain with example.

                                   10.  Distinguish between left and right joins.
                                   Answers: Self  Assessment


                                   1.  union                             2.   (Select)
                                   3.  drop                              4.   Views
                                   5.  SQL joins                         6.   inner join
                                   7.  Natural join                      8.   chaining

                                   9.  having                            10.  nested





          70                                LOVELY PROFESSIONAL UNIVERSITY
   72   73   74   75   76   77   78   79   80   81   82