Miguel Lucero
Test por , creado hace más de 1 año

CIS 3365 Test sobre CHAPTER 8: ADVANCED SQL, creado por Miguel Lucero el 05/04/2017.

452
2
0
Miguel Lucero
Creado por Miguel Lucero hace más de 7 años
Cerrar

CHAPTER 8: ADVANCED SQL

Pregunta 1 de 68

1

1. A relational join operation merges rows from two tables.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 2 de 68

1

2. An inequality condition is also known as a natural join and an equality condition is also called a theta join.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 3 de 68

1

3. Subqueries cannot be used in combinations with joins.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 4 de 68

1

4. The SELECT statement uses the attribute list to indicate what columns to project in the resulting set.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 5 de 68

1

5. Numeric functions take one numeric parameter and return one value.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 6 de 68

1

6. String manipulation functions are rarely used in programming.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 7 de 68

1

7. UNION, INTERSECT, and MINUS work properly only if relations are intersect-compatible, which means that the names of the relation attributes and their data types must be different.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 8 de 68

1

8. A view is a virtual table based on a SELECT query.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 9 de 68

1

9. A sequence is not associated with a table and can be dropped from a database with a DROP SEQUENCE command.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 10 de 68

1

10. SQL supports the conditional execution of procedures (IF-THEN-ELSE statements) that are typically supported by a programming language.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 11 de 68

1

11. To remedy the lack of procedural functionality in SQL, and to provide some standardization within the many vendor offerings, the SQL-99 standard defined the use of persistent stored modules.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 12 de 68

1

12. A persistent stored module is stored and executed on the database client machine.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 13 de 68

1

13. Every PL/SQL block must be given a name.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 14 de 68

1

14. In Oracle, you can use the SQL*Plus command SHOW ERRORS to help you diagnose errors found in PL/SQL blocks.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 15 de 68

1

15. PL/SQL blocks have a section used to declare variables.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 16 de 68

1

16. The most useful feature of PL/SQL blocks is that they let a designer create code that can be named, stored, and executed by the DBMS.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 17 de 68

1

17. Automating business procedures and automatically maintaining data integrity and consistency are trivial in a modern business environment.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 18 de 68

1

18. A trigger is procedural SQL code that is automatically invoked by the RDBMS upon the occurrence of a given data manipulation event.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 19 de 68

1

19. Triggers can only be used to update table values.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 20 de 68

1

20. A statement-level trigger is assumed if a designer omits the FOR EACH ROW keywords.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 21 de 68

1

21. A row-level trigger is assumed if we omit the FOR EACH ROW keywords and a statement-level trigger required the use of the FOR EACH ROW keyword.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 22 de 68

1

22. MySQL allows multiple triggering conditions per trigger.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 23 de 68

1

23. BEFORE means before the changes are made in memory but after the changes are permanently saved to disk.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 24 de 68

1

24. Just like database triggers, stored procedures are stored in the database.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 25 de 68

1

25. One of the major advantages of stored procedures is that they can be used to encapsulate and represent business transactions.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 26 de 68

1

26. Stored procedures must have at least one argument.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 27 de 68

1

27. Variables can be declared inside a stored procedure.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 28 de 68

1

28. Cursors are held in a reserved memory area in the client computer.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 29 de 68

1

29. An implicit cursor is automatically created in procedural SQL when the SQL statement returns only one

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 30 de 68

1

30. An explicit cursor must return two or more rows.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 31 de 68

1

31. A stored function is another name for a stored procedure.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 32 de 68

1

Linked SQL” is a term used to refer to SQL statements that are contained within an application programming language such as COBOL, C++, ASP, Java, or ColdFusion.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 33 de 68

1

33. The following SQL statement uses a(n) .
SELECT P_CODE, P_DESCRIPT, P_PRICE, V_NAME FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE = VENDOR.V_CODE;

Selecciona una de las siguientes respuestas posibles:

  • a. set operator

  • b. natural join

  • c. “old­style” join

  • d. procedural statement

Explicación

Pregunta 34 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. full

  • b. inner

  • c. outer

  • d. set

Explicación

Pregunta 35 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. cross

  • b. natural

  • c. equi-

  • d. full

Explicación

Pregunta 36 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. 8

  • b. 18

  • c. 26

  • d. 144

Explicación

Pregunta 37 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. natural

  • b. cross

  • c. full

  • d. outer

Explicación

Pregunta 38 de 68

1

38. If a designer wishes to create an inner join, but the two tables do not have a commonly named attribute, he can use a(n) _____ clause.

Selecciona una de las siguientes respuestas posibles:

  • a. OF

  • b. USING

  • c. HAS

  • d. JOIN ON

Explicación

Pregunta 39 de 68

1

39. 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.

Selecciona una de las siguientes respuestas posibles:

  • a. outer

  • b. inner

  • c. equi-

  • d. cross

Explicación

Pregunta 40 de 68

1

40. The syntax for a left outer join is .

Selecciona una de las siguientes respuestas posibles:

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

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

  • SELECT column-list
    WHERE LEFT table1 = table 2

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

Explicación

Pregunta 41 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. outer

  • b. left

  • c. inner

  • d. base

Explicación

Pregunta 42 de 68

1

42. In the context of SELECT subquery types, a is returned when an UPDATE subquery is used.

Selecciona una de las siguientes respuestas posibles:

  • a. NULL

  • b. single value

  • c. list of values

  • d. virtual table

Explicación

Pregunta 43 de 68

1

43. Which of the following is a feature of a correlated subquery?

Selecciona una de las siguientes respuestas posibles:

  • a. The inner subquery executes first.

  • b. The outer subquery initiates the process of execution in a subquery.

  • c. The inner subquery initiates the process of execution in a subquery.

  • d. The outer subquery executes independent of the inner subquery

Explicación

Pregunta 44 de 68

1

44. The function returns the current system date in MS Access.

Selecciona una de las siguientes respuestas posibles:

  • a. TO_DATE()

  • b. SYSDATE()

  • c. DATE()

  • d. TODAY()

Explicación

Pregunta 45 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. MON

  • b. MM3

  • c. MONTH

  • d. MM

Explicación

Pregunta 46 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. CONVERT()

  • b. TO_DATE

  • c. TO_CHAR()

  • d. TO_STRING()

Explicación

Pregunta 47 de 68

1

is a string function that returns the number of characters in a string value.

Selecciona una de las siguientes respuestas posibles:

  • a. LENGTH

  • b. SUBSTRING

  • c. CONCAT

  • d. UCASE

Explicación

Pregunta 48 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. 0

  • b. 9

  • c. $

  • d. #

Explicación

Pregunta 49 de 68

1

49. 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.

Selecciona una de las siguientes respuestas posibles:

  • a. NVL

  • b. TO_CHAR

  • c. DECODE

  • d. CONVERT

Explicación

Pregunta 50 de 68

1

50. is a relational set operator.

Selecciona una de las siguientes respuestas posibles:

  • a. MINUS

  • b. PLUS

  • c. ALL

  • d. EXISTS

Explicación

Pregunta 51 de 68

1

51. “Union­compatible” means that the .

Selecciona una de las siguientes respuestas posibles:

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

  • 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 alike

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

Explicación

Pregunta 52 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. DATE

  • b. INT

  • c. TINYINT

  • d. CHAR(15)

Explicación

Pregunta 53 de 68

1

53. The statement combines rows from two queries and excludes duplicates.

Selecciona una de las siguientes respuestas posibles:

  • a. UNION

  • b. UNION ALL

  • c. INTERSECT

  • d. MINUS

Explicación

Pregunta 54 de 68

1

54. Assume a designer is 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 CUSTOMER_2 table contains 7 rows. Customers Jenna and Howard are included in the CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the UNION operator?

Selecciona una de las siguientes respuestas posibles:

  • a. 7

  • b. 10

  • c. 15

  • d. 17

Explicación

Pregunta 55 de 68

1

55. 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 CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the UNION ALL operator?

Selecciona una de las siguientes respuestas posibles:

  • a. 7

  • b. 10

  • c. 15

  • d. 17

Explicación

Pregunta 56 de 68

1

56. 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 CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the INTERSECT operator?

Selecciona una de las siguientes respuestas posibles:

  • a. 0

  • b. 2

  • c. 7

  • d. 10

Explicación

Pregunta 57 de 68

1

57. 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.

Selecciona una de las siguientes respuestas posibles:

  • a. UNION

  • b. UNION ALL

  • c. INTERSECT

  • d. MINUS

Explicación

Pregunta 58 de 68

1

58. 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?

Selecciona una de las siguientes respuestas posibles:

  • a. 0

  • b. 2

  • c. 8

  • d. 10

Explicación

Pregunta 59 de 68

1

59. The operator could be used in place of INTERSECT if the DBMS does not support it.

Selecciona una de las siguientes respuestas posibles:

  • a. IN

  • b. OF

  • c. AND

  • d. UNION

Explicación

Pregunta 60 de 68

1

60. The operator could be used in place of MINUS if the DBMS does not support it.

Selecciona una de las siguientes respuestas posibles:

  • a. IN

  • b. NOT IN

  • c. AND

  • d. UNION

Explicación

Pregunta 61 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. auto-number

  • b. sequence

  • c. TO_NUMBER function

  • d. trigger

Explicación

Pregunta 62 de 68

1

62. Which of the following is a feature of oracle sequences?

Selecciona una de las siguientes respuestas posibles:

  • a. Oracle sequences are tied to columns and tables.

  • b. Oracle sequences generate a character string
    that can be assigned to tables.

  • c. An oracle sequence uses the identity column property to automatically number rows.

  • d. An oracle sequence can be created and deleted anytime.

Explicación

Pregunta 63 de 68

1

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

Selecciona una de las siguientes respuestas posibles:

  • a. CURRVAL

  • b. NEXTVAL

  • c. NEXT

  • d. GET_NEXT

Explicación

Pregunta 64 de 68

1

64. 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.

Selecciona una de las siguientes respuestas posibles:

  • a. cursor-style processing

  • b. stored procedures

  • c. embedded SQL

  • d. Procedural Language SQL

Explicación

Pregunta 65 de 68

1

65. The Oracle string concatenation function is .

Selecciona una de las siguientes respuestas posibles:

  • a. CONCAT

  • b. +

  • c. ||

  • d. &&

Explicación

Pregunta 66 de 68

1

66. The PL/SQL block starts with the section.

Selecciona una de las siguientes respuestas posibles:

  • a. IS

  • b. OPEN

  • c. DECLARE

  • d. BEGIN

Explicación

Pregunta 67 de 68

1

67. Oracle recommends for creating audit logs.

Selecciona una de las siguientes respuestas posibles:

  • a. triggers

  • b. stored procedures

  • c. stored functions

  • d. tables

Explicación

Pregunta 68 de 68

1

68. is a cursor attribute that returns TRUE if the last FETCH returned a row, and FALSE if not.

Selecciona una de las siguientes respuestas posibles:

  • a. %ROWCOUNT

  • b. %NOTFOUND

  • c. %FOUND

  • d. %ISOPEN

Explicación