Database Application Final

  1. What is a database?




    A. A database is a structure that contains different categories of information and the relationships between these categories.
  2. Which of the following is a valid KIMTAY database?




    A. An ITEM is sold to only one customer in an invoice.
  3. Which table in the KIMTAY database is ITEM ID found?




    B. ITEM and INVOICE_LINE tables
  4. What information is contained in the CUSTOMER table in the KIMTAY database?




    D. Customer name, contact information, and customer representative
  5. Which of the following is a table in the STAYWELL database?




    B. OWNER
  6. Which of the following is not a table in the STAYWELL database?




    A. ADDRESS
  7. Which of the following is a unique identifier?




    B. OWNER_ID
  8. Which of the following is not table in the KIMTAY database?




    A. REPRESENTATIVE
  9. Which of the following statements is true?





    C. A relational database is a collection of entities
  10. Which of the following statements about functional dependencies is true?




    C. Column B is functionally dependent on another column when a value for A determines a single value for B at any one time.
  11. A primary key is _______.




    B. a unique identifier of a table
  12. When is a table is in first normal form (1NF)?




    A. When a table does not contain repeating group
  13. Which of the following is not an entity?




    D. An idea
  14. When is a relation in second normal form (2NF)?




    D. It is in first normal form and nonkey column is dependent on only a portion of the primary key.
  15. Which of the following is not a step of database design?






    F. None of the above
  16. Data anomalies are classified into which of the following four categories?




    A. Updates, additions, deletions, and inconsistent data
  17. What is an attribute?




    B. An attribute is a property of an entity
  18. What is a relationship?




    C. A relationship is an association between two entities
  19. Which of the following removes a table from a database?






    C. DROP
  20. Which of the following commands list existing databases in Oracle?





    E. None of the above
  21. Which command is used to list all columns in MS SQL Server?






    F. None of the above
  22. Which of the following does NOT NULL indicate?




    B. Column must not be void
  23. Which command is used to work within a specific database in Oracle?





    B. USE DATABASE
  24. Which of the following SQL statements is valid?






    D. SELECT * FROM sales_rep;
  25. Which of the following is not valid SQL command?






    B. SHOW
  26. Which of the following SQL statements is valid?




    B. INSERT INTO SALES_REP VALUES('25, 'Donna', 'Sanchez');
  27. Which of the following SQL statements is valid for MySQl, Oracle, and MS SQL Server?






    D. CREATE TABLE sales_rep (id CHAR(2), name CHAR(30));
  28. Which of the following commands list columns of a table in MS SQL?






    D. EXEC SP_COLUMNS
  29. Which of the following comparison operators is NOT EQUAL?






    D. <>
  30. Which of the following is not a valid compound operator?






    D. BETWEEN
  31. Which of the following statements will display rows for a commission greater than 100 and less than 2000?






    D. SELECT col1, col2, coln FROM table_name WHERE commission > 100 AND commission < 2000;
  32. Which of the following is a valid statement?

    A. WHERE clause to limit the rows and HAVING clause to limit the groups
    B. WHERE clause to limit the groups and HAVING clause to the limit the columns
    C. WHERE clause to limit the rows and HAVING clause to limit the columns
    D. WHERE clause to limit the groups and HAVING clause to limit the groups
    A. WHERE clause to limit the rows and HAVING clause to limit the groups
  33. Which of the following is not an aggregate function?






    D. MED
  34. Which of the following is a valid SQL statement?




    C. SELECT col1, col2 FROM table_name WHERE col1 = value ORDER BY col1;
  35. Which of the following SQL statements will display REP_ID column values in a sorted manner?






    D. SELECT rep_id FROM SALES_REP ORDER BY rep_id DESC;
  36. Which of the following statements will list a specific record in a table?






    B. SELECT col1, col2 FROM table_name WHERE col1 = value;
  37. Which query will return rows for a column that has no value?




    D. SELECT col1, col2 FROM table_name WHERE col1 IS NULL;
  38. Which of the following is true of a subquery?






    E. All of the above
  39. What are the steps to join two tables?






    B. List columns to be displayed, list of tables containing displayed columns, restrict rows from the two tables that have common values in matching columns.
  40. What is an EXISTS operator?






    B. An operator that checks the existence of rows that satisfies some criterion
  41. Which of the following would you use to produce a combination of all rows from two tables?




    B. PRODUCT
  42. What is an alias?




    C. an alternate name for a table in the FROM clause
  43. Which of the following statements is true?




    B. Right outer join, all rows from the table on the right are included regardless of whether they match rows from the table on the left.
  44. Which two conditions must be met in order to use UNION operators?




    C. The two tables must have the column datatypes and same number of columns.
  45. Which of the following statements is valid? 






    A. ALL operator: the condition is true only if it satisfies all values: ANY operator: the condition is true if it satisfies any value.
  46. Which of the following is not a SET operator in MySQL Server?






    B. INTERSECT
  47. Which of the following is not true about joining a table to itself?






    A.   Known as SELF-JOIN
  48. Which of the following is not a valid JOIN command?






    C. FULL INNER JOIN
  49. Which of the following is not a valid INSERT statement?






    D. INSERT INTO table_name1 VALUES (SELECT col1, col2 FROM table_name1);
  50. How do you reverse a transaction?






    B. Use ROLLBACK
  51. Which of the following is not a valid command related to transactions?





    C. SAVE
  52. How do you add a column to an existing table in MySQL?




    D. ALTER TABLE table_name ADD new_column CHAR(3);
  53. How do you change a column to an existing table in MS SQL Server?




    A. ALTER TABLE table_name ALTER COLUMN column_name CHAR(3);
  54. Which of the following SQL statements is valid?






    C. INSERT INTO table_name1 SELECT col1, col2 FROM table_name2;
  55. Which of the following statements is valid?






    D. ALTER TABLE table_name MODIFY col1 CHAR(10);
  56. Which of the following statements defines a TRANSACTION?






    B. A transaction is a sequence of steps that accomplish a single task.
  57. Which clause is used to change a column in a table?




    A. MODIFY
  58. Which of the following SQL vendors does not include AUTOCOMMIT?





    C. MS SQL Server
  59. Which of the following statements is not true about a view?






    C. A view provides a great simplification of table administration.
  60. Which of the following vendors will display an error when using an ORDER BY clause in a CREATE VIEW statement?





    C. Oracle and MS SQL Server
  61. Which of the following is not true about updatable views?






    D. A view is updatable regardless of the underlying query.
  62. Which of the following SQL commands removes a view from the database?




    C. DROP VIEW
  63. Which of the following SQL statements is false?






    B. GRANT VIEW ON SALES_REP TO JOHNSON;
  64. Which of the following statements is true?






    E. All of the above
  65. Information kept about tables is usually known as _________.




    B. data dictionary
  66. Which of the following SQL statements is valid?






    D. ALTER TABLE INVOICES ADD FOREIGN KEY (CUST_ID) REFERENCES CUSTOMER (CUST_ID);
  67. Which of the following SQL clauses is used to enforce data  integrity?




    B. CHECK
  68. Which of the following SQL statements is correct?




    B. CREATE UNIQUE INDEX SSN ON SALES_REP (SOC_SEC_NUM);
  69. Which SQL vendor supports an UPPER function to display values in uppercase?





    D. All of the above
  70. Which of the following functions do you use to get a current data and time in Oracle?






    B. SYSDATE
  71. Which SQL vendor has a CONCAT function that takes only two strings as arguments?





    B. Oracle
  72. Which of the following statements best defines stored procedure?




    C. Stored procedure is an SQL script stored in the database and can be executed automatically.
  73. What construct is used to handle conditions that can arise when accessing the database in MySQL?






    A. EXIT HANDLER
  74. What is a cursor?






    C. A cursor is a pointer to a row in the collection of rows retrieved by an SQL command.
  75. What are the steps to use a cursor in a procedure?






    B. DECLARE, OPEN, FETCH, CLOSE
  76. How do you run a stored procedure in MS SQL Server?






    B. EXEC procedure_name
  77. Which of the following statements in true?




    C. A trigger is a procedure that is executed automatically in response to an INSERT, UPDATE, or DELETE command.
  78. Which of the following commands is required in MySQL to create a stored procedure?




    B. DELIMITER
Author
jdavis123
ID
360187
Card Set
Database Application Final
Description
Updated