. .
Quiz by , created more than 1 year ago

asdf Quiz on Chapter 8 (Multiple Choice CIS 3365), created by . . on 22/09/2016.

745
3
0
. .
Created by . . almost 8 years ago
Close

Chapter 8 (Multiple Choice CIS 3365)

Question 1 of 40

1

1. The following SQL statement uses a(n) ____.SELECT P_CODE, P_DESCRIPT, P_PRICE, V_NAMEFROM PRODUCT, VENDORWHERE PRODUCT.V_CODE = VENDOR.V_CODE;

Select one of the following:

  • a. set operator

  • b. natural join

  • c. “old-style” join

  • d. procedural statement

Explanation

Question 2 of 40

1

2. When using a(n) ____ join, only rows that meet the given criteria are returned.

Select one of the following:

  • a. full

  • b. inner

  • c. outer

  • d. set

Explanation

Question 3 of 40

1

3. The statement SELECT * FROM T1, T2 produces a(n) ____ join.

Select one of the following:

  • a. cross

  • b. natural

  • c. equi

  • d. full

Explanation

Question 4 of 40

1

4. How many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 18?

Select one of the following:

  • a. 8

  • b. 18

  • c. 26

  • d. 144

Explanation

Question 5 of 40

1

5. A(n) ____ join will select only the rows with common values in the common attribute(s).

Select one of the following:

  • a. natural

  • b. cross

  • c. full

  • d. outer

Explanation

Question 6 of 40

1

6. If you wish to create an inner join, but the two tables do not have a commonly named attribute, you can use a(n) ____ clause.

Select one of the following:

  • a. OF

  • b. USING

  • c. HAS

  • d. JOIN ON

Explanation

Question 7 of 40

1

7. The ANSI standard defines ____ type(s) of outer join(s)

Select one of the following:

  • a. one

  • b. two

  • c. three

  • d. four

Explanation

Question 8 of 40

1

8. A(n) ____ join returns not only the rows matching the join condition (that is, rows with matching values in the common columns) but also the rows with unmatched values.

Select one of the following:

  • a. outer

  • b. inner

  • c. equi

  • d. cross

Explanation

Question 9 of 40

1

9. The syntax for a left outer join is ____.

Select one of the following:

  • a. SELECT column-list FROM table1 OUTER JOIN table2 LEFTWHERE join-condition

  • b. SELECT column-list FROM table1 LEFT [OUTER] JOIN table2ON join-condition

  • c. SELECT column-list WHERE LEFT table1 = table 2

  • d. SELECT column-list FROM table1 LEFT table2 [JOIN] WHERE join-condition

Explanation

Question 10 of 40

1

10. A ____ join returns rows with matching values and includes all rows from both tables (T1 and T2) with unmatched values.

Select one of the following:

  • a. natural

  • b. cross

  • c. full outer

  • d. left outer

Explanation

Question 11 of 40

1

11. A ____ is a query (SELECT statement) inside a query.

Select one of the following:

  • a. subquery

  • b. range query

  • c. join

  • d. set query

Explanation

Question 12 of 40

1

12. In subquery terminology, the first query in the SQL statement is known as the ____ query.

Select one of the following:

  • a. outer

  • b. left

  • c. inner

  • d. base

Explanation

Question 13 of 40

1

13. In a subquery, the ____ query is executed first

Select one of the following:

  • a. left

  • b. right

  • c. inner

  • d. outer

Explanation

Question 14 of 40

1

14.The ____ function returns the current system date in MS Access.

Select one of the following:

  • a. TO_DATE(

  • b. SYSDATE()

  • c. DATE()

  • d. TODAY()

Explanation

Question 15 of 40

1

15. When using the Oracle TO_DATE function, the code ____ represents a three-letter month name.

Select one of the following:

  • a. MON

  • b. MM3

  • c. MONTH

  • d. MM

Explanation

Question 16 of 40

1

16. The Oracle ____ function returns the current date

Select one of the following:

  • a. DATE

  • b. SYSDATE

  • c. CURRENT_DATE

  • d. TO_DATE

Explanation

Question 17 of 40

1

17. In Oracle, the ____ function converts a date to a character string.

Select one of the following:

  • a. CONVERT()

  • b. TO_DATE

  • c. TO_CHAR()

  • d. TO_STRING()

Explanation

Question 18 of 40

1

18. The Oracle string concatenation function is ____.

Select one of the following:

  • a. CONCAT

  • b. +

  • c. ||

  • d. &&

Explanation

Question 19 of 40

1

19. When using the Oracle TO_NUMBER function to convert a character string into a number, ____represents a digit.

Select one of the following:

  • a. 0

  • b. 9

  • c. $

  • d. #

Explanation

Question 20 of 40

1

20. ____ is a relational set operator.

Select one of the following:

  • a. MINUS

  • b. PLUS

  • c. ALL

  • d. EXISTS

Explanation

Question 21 of 40

1

21. “Union-compatible” means that the ____.

Select one of the following:

  • a. names of the relation attributes can be different, but the data types must be identical

  • b. names of the relation attributes must be the same, but the data types can be different

  • c. names of the relation attributes must be the same and their data types must be identical

  • d. number of attributes must be the same, but the names and data types can be different

Explanation

Question 22 of 40

1

22. The ____ data type is considered compatible with VARCHAR(35).

Select one of the following:

  • a. DATE

  • b. INT

  • c. TINYINT

  • d. CHAR(15)

Explanation

Question 23 of 40

1

23. The Oracle ____ function compares an attribute or expression with a series of values and returns an associated value or a default value if no match is found.

Select one of the following:

  • a. NVL

  • b. TO_CHAR

  • c. DECODE

  • d. CONVERT

Explanation

Question 24 of 40

1

24. The ____ data type is compatible with NUMBER.

Select one of the following:

  • a. VARCHAR(15)

  • b. SMALLINT

  • c. DATE

  • d. CHAR(10)

Explanation

Question 25 of 40

1

25. The ____ query combines rows from two queries and excludes duplicates.

Select one of the following:

  • a. UNION

  • b. UNION ALL

  • c. INTERSECT

  • d. MINUS

Explanation

Question 26 of 40

1

26. The syntax for the UNION query is ____.

Select one of the following:

  • a. query + query

  • b. UNION (query, query)

  • c. UNION: query query

  • d. query UNION query

Explanation

Question 27 of 40

1

27. Assume you are using the UNION operator to combine the results from two tables with identical structure,CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUS-TOMER_2 table contains 7 rows. Customers Dunne and Olowski are included in the CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the UNION operator?

Select one of the following:

  • a. 7

  • b. 10

  • c. 15

  • d. 17

Explanation

Question 28 of 40

1

28. Assume you are using the UNION ALL operator to combine the results from two tables with identical structure, CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains 7 rows. Customers Dunne and Olowski are included in the CUS-TOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the UNION ALL
operator?

Select one of the following:

  • a. 7

  • b. 10

  • c. 15

  • d. 17

Explanation

Question 29 of 40

1

29. Assume you are using the INTERSECT operator to combine the results from two tables with identical structure, CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains 7 rows. Customers Dunne and Olowski are included in the CUS-TOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the INTERSECT operator?

Select one of the following:

  • a. 0

  • b. 2

  • c. 7

  • d. 10

Explanation

Question 30 of 40

1

30. The ____ statement in SQL combines rows from two queries and returns only the rows that appear in the first set but not in the second.

Select one of the following:

  • a. UNION

  • b. UNION ALL

  • c. INTERSECT

  • d. MINUS

Explanation

Question 31 of 40

1

31. Assume you are using the MINUS operator to combine the results from two tables with identical structure, CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains 7 rows. Customers Dunne and Olowski are included in the CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the MINUS operator?

Select one of the following:

  • a. 0

  • b. 2

  • c. 8

  • d. 10

Explanation

Question 32 of 40

1

32. The ____ operator could be used in place of INTERSECT if the RDBMS does not support it.

Select one of the following:

  • a. IN

  • b. OF

  • c. AND

  • d. UNION

Explanation

Question 33 of 40

1

33. The ____ operator could be used in place of MINUS if the RDBMS does not support it.

Select one of the following:

  • a. IN

  • b. NOT IN

  • c. AND

  • d. UNION

Explanation

Question 34 of 40

1

34. The Oracle equivalent to an MS Access AutoNumber is a(n) ____.

Select one of the following:

  • a. auto-number

  • b. sequence

  • c. TO_NUMBER function

  • d. Trigger

Explanation

Question 35 of 40

1

35. The ____ pseudo-column is used to select the next value from a sequence.

Select one of the following:

  • a. CURRVAL

  • b. NEXTVAL

  • c. NEXT

  • d. GET_NEXT

Explanation

Question 36 of 40

1

36. A(n) ____ is a block of code (containing standard SQL statements and procedural extensions) that is stored and executed at the DBMS server.

Select one of the following:

  • a. PSM

  • b. PLS

  • c. SQL Statement

  • d. PMR

Explanation

Question 37 of 40

1

37. In Oracle, ____ make(s) it possible to merge SQL and traditional programming constructs, such as variables, conditional processing (IF-THEN-ELSE), basic loops (FOR and WHILE loops,) and error trapping.

Select one of the following:

  • a. triggers

  • b. indexes

  • c. embedded SQL

  • d. procedural SQL

Explanation

Question 38 of 40

1

38. The PL/SQL block starts with the ____ clause.

Select one of the following:

  • a. IS

  • b. OPEN

  • c. DECLARE

  • d. BEGIN

Explanation

Question 39 of 40

1

39. Oracle recommends ____ for creating audit logs.

Select one of the following:

  • a. triggers

  • b. stored procedures

  • c. stored functions

  • d. tables

Explanation

Question 40 of 40

1

40. A stored function uses the ____ statement to return a value.

Select one of the following:

  • a. EXIT

  • b. END

  • c. RETURN

  • d. PROCESS

Explanation