1. In the format SELECT-FROM-WHERE, the fundamental structure of SQL statements,

 

            a.  the SELECT expression specifies the table to be used, FROM specifics the

                        names of the table’s columns, and WHERE provides the

                        condition(s) for the selection.

            b.  the SELECT expression specifies the names of  the table’s columns,

                        FROM specifies the table to be used, and WHERE provides the

                        condition(s) for the selection.

            c.  the FROM expression specifies the names of  the table’s columns, WHERE

                        specifies the table to be used, and SELECT provides the condition(s) for

                        the selection.

d.      none of the above.

 

2. In order for conditions in a WHERE clause to refer to a set of values,

 

            a.  the keyword DISTINCT must be used.

            b.  the symbol = must be used.

            c.  the keywords IN or NOT IN must be used.

            d.  the keyword INCLUDE must be used.

e.       none of the above.

 

3. In the result of the expression: SELECT Major, COUNT(*) FROM STUDENT GROUP BY Major

           

            a.  the rows of the STUDENT table will be logically grouped by the value of                                    MAJOR.

            b.  the COUNT function will have counted the number of rows in each group.

            c.  both a and b.

d.      none of the above.

 

4. Operations on two or more tables may usually be done using

 

            a.  subquery or nested query.

            b.  joins.

            c.  Kartesian cross dressing.

            d.  a and b above.

e.  a, b and c above.

 

5. A view may be

           

a.      defined over base tables.

b.     defined over existing views.

c.      used to provide security.

d.     a and b above.

e.      a, b and c above.

 

6. To give GEEK read, write, update and delete privileges on table COMPUTER, use

 

a.      GRANT READ, WRITE, UPDATE, DELETE ON COMPUTER TO GEEK.

b.     GRANT  SELECT, INSERT, UPDATE, DELETE ON COMPUTER TO GEEK.

c.      GRANT ALL ON COMPUTER TO GEEK.

d.     either a or b above.

e.      either b or c above.

 

7.      If two relations have the same number of attributes, and the attributes in corresponding columns come for the same domain, then the relations are:

 

a.       union compatible.

b.       amenable to difference operations.

c.       non-joinable.

d.       a and b above.

e.       a, b and c above.

 

8.  Rows are removed from a table by the use of the term

 

            a.  SUBTRACT.

            b.  REMOVE.

            c.  DELETE.

d.      none of the above.

 

9.      To create new tables in SQL, we use:

 

a.       the DEFINE TABLE statement.

b.      the INSERT TABLE statement.

c.       the NEW TABLE statement.

d.      none of the above.

 

10.  To remove a table using SQL, we use:

 

a.       the DROP TABLE statement.

b.      the DELETE TABLE statement.

c.       the ERASE TABLE statement.

d.      none of the above.