final1

Embed Size (px)

DESCRIPTION

oracle

Citation preview

1. It is possible to implement non-transferability via a simple Foreign Ke y Relationship. True or False? Mark for Review (1) Points True False (*)

Correct

Correct

2. The Oracle Database can implement a many-to-many relati onship. You simply create two foreign keys between the two tables. True or False ? Mark for Review (1) Points True False (*)

Correct

Correct 3. In a physical data model, an attribute becomes a ______ Mark for Review

_______. (1) Points Table

Foreign Key Constraint Column (*)

Correct

Correct

4. In a physical data model, a relationship is represented as a combination of: (Choose Two) Mark for Review (1) Points (Choose all correct answers) Column

Primary Key or Unique Key (*) Check Constraint or Unique Key Foreign Key (*)

Incorrect

Incorrect. Refer to Section 11 Lesson 2.

5. The transformation from an ER diagram to a physical des ign involves changing terminology. Secondary Unique Identifiers become Mark fo r Review (1) Points Columns Tables Unique Constraints (*) Primary Key Constraints

Correct

Correct

6. The explanation below is a User Defined integrity rule and must, therefore, be manually coded; the Database cannot enforce this rule au tomatically. True or False? A primary key must be unique, and no part of the primary key can be null. Mark for Review (1) Points True False (*)

Incorrect 7. Mark for Review (1) Points

Incorrect. Refer to Section 11 Lesson 1. A table must have a primary key. True or False?

True False (*)

Incorrect

Incorrect. Refer to Section 11 Lesson 1.

8. A table must have at least one candidate key, as well a s its primary key. True or False? Mark for Review (1) Points True False (*)

Correct

Correct

9. Identify all of the incorrect statements that complete this sentence: A primary key is: (Choose three) Mark for Review (1) Points (Choose all correct answers) A single column that uniquely identifies each column in a table. (*) One or more columns in a table that uniquely identifies each row in that table. A set of columns in one table that uniquely identifies each row in anoth er table. (*) Only one column that must be null. (*)

Incorrect

Incorrect. Refer to Section 11 Lesson 1.

10. The explanation below is a column integrity constraint. True or False? A column must contain only values consistent with the defined data format of the column. Mark for Review (1) Points

True (*) False

Correct Correct Review your answers, feedback, and question scores below. An asterisk (*) indica tes a correct answer. Section 11 (Answer all questions in this section) 11. An "Arc Implementation" can be done just like any other Relationship - you simply add the required Foreign Keys. True or False? Mark for Review (1) Points True False (*)

Correct

Correct

Section 12 (Answer all questions in this section) 12. in the database? (1) Points CREATE NEW ADD INSERT (*) What command can be used to create a new row in a table Mark for Review

Correct

Correct.

13. The _______ clause can be added to a SELECT statement t o return a subset of the data. Mark for Review (1) Points

ANYWHERE WHICH WHERE (*) EVERY

Correct

Correct. What command will return data from the database to you?

14. Mark for Review (1) Points FETCH GET SELECT (*) RETURN

Correct

Correct.

15. In the Analysis phase, the tables are created and popula ted with test data. True or False? Mark for Review (1) Points True False (*)

Correct

Correct.

16. During which phases of the System Development Life Cycle would you test the system before rolling it out to the users? Mark for Review (1) Points Build and Transition

Strategy and Analysis Design and Production Transition and Production (*)

Incorrect

Incorrect. Refer to Section 12 Lesson 4.

ID 1 2 3 If you DELETE

17. The f_customers table contains the following data: Name Address City State Zip Cole Bee 123 Main Street Orlando FL 32838 Zoe Twee 1009 Oliver Avenue Boston MA 02116 Sandra Lee 22 Main Street Tampa FL 32444 run the following statement: FROM F_CUSTOMERS WHERE ID "=>" >= (*) !=

Correct Correct. Section 16 (Answer all questions in this section) 31. The EMPLOYEES table includes these columns: EMPLOYEE_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(15) NOT NULL FIRST_NAME VARCHAR2(10) NOT NULL HIRE_DATE DATE NOT NULL You want to produce a report that provides the last names, first names, and hire dates of those employees who were hired between March 1, 2000, and August 30, 2 000. Which statements can you issue to accomplish this task? Mark for Review (1) Points SELECT last_name, first_name, hire_date FROM employees WHERE hire_date BETWEEN '01-MAR-2000' AND '30-AUG-2000'; (*)

SELECT last_name, first_name, hire_date FROM employees WHERE hire_date BETWEEN '30-AUG-2000' AND '01-MAR-2000';

SELECT last_name, first_name, hire_date FROM employees GROUP BY hire_date >= '01-MAR-2000' and hire_date = '01-MAR-2000' and hire_date 20000; Which values would cause the logical condition to return TRUE? Mark for Review (1) Points DEPARTMENT_ID = 10 and SALARY = 20000 DEPARTMENT_ID = 20 and SALARY = 20000 DEPARTMENT_ID = null and SALARY = 20001

DEPARTMENT_ID = 10 and SALARY = 20001 (*)

Correct

Correct.

Section 17 (Answer all questions in this section) 37. The PLAYERS table contains these columns: PLAYERS TABLE: LAST_NAME VARCHAR2 (20) FIRST_NAME VARCHAR2 (20) SALARY NUMBER(8,2) TEAM_ID NUMBER(4) MANAGER_ID NUMBER(9) POSITION_ID NUMBER(4) You must display the player name, team id, and salary for players whose salary i s in the range from 25000 through 100000 and whose team id is in the range of 12 00 through 1500. The results must be sorted by team id from lowest to highest an d then further sorted by salary from highest to lowest. Which statement should y ou use to display the desired result? Mark for Review (1) Points SELECT last_name, first_name, team_id, salary FROM players WHERE (salary > 25000 OR salary < 100000) AND team_id BETWEEN 1200 AND 1500 ORDER BY team_id, salary; SELECT last_name, first_name, team_id, salary FROM players WHERE salary BETWEEN 25000 AND 100000 AND team_id BETWEEN 1200 AND 1500 ORDER BY team_id, salary DESC; (*)

SELECT last_name, first_name, team_id, salary FROM players WHERE salary > 24999.99 AND salary < 100000 AND team_id BETWEEN 1200 AND 1500 ORDER BY team_id ASC, salary DESC; SELECT last_name, first_name, team_id, salary FROM players WHERE salary BETWEEN 24999.99 AND 100000.01 AND team_id BETWEEN 1200 AND 1500 ORDER BY team_id DESC, salary DESC;

Correct

Correct.

38. The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(9) PK LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER(9) Compare these two SQL statements: 1. SELECT DISTINCT department_id DEPT, last_name, first_name FROM employees ORDER BY department_id; 2. SELECT department_id DEPT, last_name, first_name FROM employees ORDER BY DEPT; How will the results differ? Mark for Review (1) Points One of the statements will return a syntax error. One of the statements will eliminate all duplicate DEPARTMENT_ID values. There is no difference in the result between the two statements. The statements will sort on different column values. (*)

Incorrect

Incorrect! See Section 17 Lesson 3.

39. The PLAYERS table contains these columns: PLAYERS TABLE: LAST_NAME VARCHAR2 (20) FIRST_NAME VARCHAR2 (20) SALARY NUMBER(8,2) TEAM_ID NUMBER(4) MANAGER_ID NUMBER(9) POSITION_ID NUMBER(4) You want to display all players' names with position 6900 or greater. You want the players names to be displayed alphabetically by last name and then by first name. Which statement should you use to achieve the required results? Mark for Review

(1) Points SELECT last_name, first_name FROM players WHERE position_id >= 6900 ORDER BY last_name, first_name; (*)

SELECT last_name, first_name FROM players WHERE position_id > 6900 ORDER BY last_name, first_name; SELECT last_name, first_name FROM players WHERE position_id = 6900 ORDER BY last_name DESC, first_name;

Correct

Correct.

40. Which comparison condition means "Less Than or Equal To "? Mark for Review (1) Points "=)" "+=" "