GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

CHAPTER 8: ADVANCED SQL

Miguel Lucero CIS 3365 Englisch 68 Karten

Karten in diesem Stapel (68)

  1. 11. A relational join operation merges rows from two tables.ANSWER: True
  2. 22. An inequality condition is also known as a natural join and an equality condition is also called a theta join.ANSWER: False
  3. 33. Subqueries cannot be used in combinations with joins.ANSWER: False
  4. 44. The SELECT statement uses the attribute list to indicate what columns to project in the resulting set.ANSWER: True
  5. 55. Numeric functions take one numeric parameter and return one value.ANSWER: True
  6. 66. String manipulation functions are rarely used in programming.ANSWER: False
  7. 77. 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.ANSWER: False
  8. 88. A view is a virtual table based on a SELECT query.ANSWER: True
  9. 99. A sequence is not associated with a table and can be dropped from a database with a DROP SEQUENCE command.ANSWER: True
  10. 1010. SQL supports the conditional execution of procedures (IF-THEN-ELSE statements) that are typically supported by a programming language.ANSWER: False
  11. 1111. 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.ANSWER: True
  12. 1212. A persistent stored module is stored and executed on the database client machine.ANSWER: False
  13. 1313. Every PL/SQL block must be given a name.ANSWER: False
  14. 1414. In Oracle, you can use the SQL*Plus command SHOW ERRORS to help you diagnose errors found in PL/SQL blocks.ANSWER: True
  15. 1515. PL/SQL blocks have a section used to declare variables.ANSWER: True
  16. 1616. 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.ANSWER: True
  17. 1717. Automating business procedures and automatically maintaining data integrity and consistency are trivial in a modern business environment.ANSWER: False
  18. 1818. A trigger is procedural SQL code that is automatically invoked by the RDBMS upon the occurrence of a given data manipulation event.ANSWER: True
  19. 1919. Triggers can only be used to update table values.ANSWER: False
  20. 2020. A statement-level trigger is assumed if a designer omits the FOR EACH ROW keywords.ANSWER: True
  21. 2121. 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.ANSWER: False
  22. 2222. MySQL allows multiple triggering conditions per trigger.ANSWER: False
  23. 2323. BEFORE means before the changes are made in memory but after the changes are permanently saved to disk.ANSWER: False
  24. 2424. Just like database triggers, stored procedures are stored in the database.ANSWER: True
  25. 2525. One of the major advantages of stored procedures is that they can be used to encapsulate and represent business transactions.ANSWER: True
  26. 2626. Stored procedures must have at least one argument.ANSWER: False
  27. 2727. Variables can be declared inside a stored procedure.ANSWER: True
  28. 2828. Cursors are held in a reserved memory area in the client computer.ANSWER: False
  29. 2929. An implicit cursor is automatically created in procedural SQL when the SQL statement returns only one value.ANSWER: True
  30. 3030. An explicit cursor must return two or more rows.ANSWER: False
  31. 3131. A stored function is another name for a stored procedure.ANSWER: False
  32. 3232. “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.ANSWER: False
  33. 3333. 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; a. set operator b. natural join c. “old­style” join d. procedural statementc. “old­style” join
  34. 3434. When using a(n) join, only rows that meet the given criteria are returned. a. full b. inner c. outer d. setb. inner
  35. 3535. The statement SELECT * FROM T1, T2 produces a(n) join. a. cross b. natural c. equi- d. fulla. cross
  36. 3636. How many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 18? a. 8 b. 18 c. 26 d. 144d. 144
  37. 3737. A(n) join will select only the rows with matching values in the common attribute(s). a. natural b. cross c. full d. outera. natural
  38. 3838. 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. a. OF b. USING c. HAS d. JOIN ONd. JOIN ON
  39. 3939. 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. a. outer b. inner c. equi- d. crossa. outer
  40. 4040. The syntax for a left outer join is . 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 c. SELECT column-list WHERE LEFT table1 = table 2 d. SELECT column-list FROM table1 LEFT table2 [JOIN] WHERE join-conditionb. SELECT column-list
    FROM table1 LEFT [OUTER] JOIN table2
    ON join-condition
  41. 4141. In subquery terminology, the first query in the SQL statement is known as the query. a. outer b. left c. inner d. basea. outer
  42. 4242. In the context of SELECT subquery types, a is returned when an UPDATE subquery is used. a. NULL b. single value c. list of values d. virtual tableb. single value
  43. 4343. Which of the following is a feature of a correlated subquery? 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 d. The outer subquery executes independent execution in a subquery. of the inner subquery.b. The outer subquery initiates the process of execution in a subquery.
  44. 4444. The function returns the current system date in MS Access. a. TO_DATE() b. SYSDATE() c. DATE() d. TODAY()c. DATE()
  45. 4545. When using the Oracle TO_DATE function, the code represents a three-letter month name. a. MON b. MM3 c. MONTH d. MMa. MON
  46. 4646. In Oracle, the function converts a date to a character string. a. CONVERT() b. TO_DATE c. TO_CHAR() d. TO_STRING()c. TO_CHAR()
  47. 4747. is a string function that returns the number of characters in a string value. a. LENGTH b. SUBSTRING c. CONCAT d. UCASEa. LENGTH
  48. 4848. When using the Oracle TO_NUMBER function to convert a character string into a number, represents a digit. a. 0 b. 9 c. $ d. #b. 9
  49. 4949. 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. a. NVL b. TO_CHAR c. DECODE d. CONVERTc. DECODE
  50. 5050. is a relational set operator. a. MINUS b. PLUS c. ALL d. EXISTSa. MINUS
  51. 5151. “Union­compatible” means that the . 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 differentc. names of the relation attributes must be the same and their data types must be alike
  52. 5252. The data type is considered compatible with VARCHAR(35). a. DATE b. INT c. TINYINT d. CHAR(15)d. CHAR(15)
  53. 5353. The statement combines rows from two queries and excludes duplicates. a. UNION b. UNION ALL c. INTERSECT d. MINUSa. UNION
  54. 5454. 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? a. 7 b. 10 c. 15 d. 17c. 15
  55. 5555. 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? a. 7 b. 10 c. 15 d. 17d. 17
  56. 5656. 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? a. 0 b. 2 c. 7 d. 10b. 2
  57. 5757. 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. a. UNION b. UNION ALL c. INTERSECT d. MINUSd. MINUS
  58. 5858. 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? a. 0 b. 2 c. 8 d. 10c. 8
  59. 5959. The operator could be used in place of INTERSECT if the DBMS does not support it. a. IN b. OF c. AND d. UNIONa. IN
  60. 6060. The operator could be used in place of MINUS if the DBMS does not support it. a. IN b. NOT IN c. AND d. UNIONb. NOT IN
  61. 6161. The Oracle equivalent to an MS Access AutoNumber is a(n) . a. auto-number b. sequence c. TO_NUMBER function d. triggerb. sequence
  62. 6262. Which of the following is a feature of oracle sequences? 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 anytime. d. An oracle sequence can be created and deleted anytime.d. An oracle sequence can be created and deleted anytime.
  63. 6363. The pseudo-column is used to select the next value from a sequence. a. CURRVAL b. NEXTVAL c. NEXT d. GET_NEXTb. NEXTVAL
  64. 6464. 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. a. cursor-style processing b. stored procedures c. embedded SQL d. Procedural Language SQLd. Procedural Language SQL
  65. 6565. The Oracle string concatenation function is . a. CONCAT b. + c. || d. &&c. ||
  66. 6666. The PL/SQL block starts with the section. a. IS b. OPEN c. DECLARE d. BEGINc. DECLARE
  67. 6767. Oracle recommends for creating audit logs. a. triggers b. stored procedures c. stored functions d. tablesa. triggers
  68. 6868. is a cursor attribute that returns TRUE if the last FETCH returned a row, and FALSE if not. a. %ROWCOUNT b. %NOTFOUND c. %FOUND d. %ISOPENc. %FOUND

Informationen

Beschreibung
CIS 3365 Karteikarten am CHAPTER 8: ADVANCED SQL, erstellt von Miguel Lucero am 03/10/2017.
Erstellt von
Miguel Lucero
Aufrufe
316
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck