Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Correct
Columns
Tables
Unique Constraints (*)
Primary Key Constraints
Correct
Review
(1) Points
True
False (*)
Correct
Review
(1) Points
Entity integrity
User-defined integrity (*)
Column integrity
Referential integrity
Review
(1) Points
True
False (*)
Correct
7. A foreign key cannot refer to a primary key in the same Mark for
table. True or False?
Review
(1) Points
True
False (*)
Correct
Review
(1) Points
Review
(1) Points
True
False (*)
Correct
Review
(1) Points
True
False (*)
Correct
11. To resolve a many to Mark for Review
many relationship in
a physical model you
create a/an (1) Points
___________________?
Correct
Section 12
(Answer all questions in this section)
12. Once you have created a table, it is not possible to Mark for
alter the definition of it. If you need to add a new
column you must delete the table definition and
create a new, correct table. True or False? Review
(1) Points
True
False (*)
Correct.
13. The f_customers table contains the following data: Mark for
ID Name Address City State Zip
1 Cole Bee 123 Main Street Orlando FL 32838 Review
(1) Points
2 Zoe Twee 1009 Oliver Avenue Boston MA 02116
3 Sandra Lee 22 Main Street Tampa FL 32444
0
3
1 (*)
2
Correct.
14. In the Analysis phase, the tables are created and Mark for
populated with test data. True or False?
Review
(1) Points
True
False (*)
Correct.
15. During which phases of the System Development Life Mark for
Cycle would you test the system before rolling it out
to the users?
Review
(1) Points
Correct.
16. What command can be used to create a new row in a Mark for
table in the database?
Review
(1) Points
CREATE
NEW
ADD
INSERT (*)
Correct.
17. What command will return data from the database to Mark for
you?
Review
(1) Points
FETCH
GET
SELECT (*)
RETURN
Correct.
18. The DESCRIBE command returns all rows from a Mark for
table. True or False?
Review
(1) Points
True
False (*)
Correct.
Section 15
(Answer all questions in this section)
Review
(1) Points
6
8 (*)
10
13
Correct.
Correct.
21. Evaluate this Mark for Review
SELECT
statement:
(1) Points
SELECT
(salary *
raise_percent)
raise
FROM
employees;
If the
RAISE_PERCEN
T column only
contains null
values, what
will the
statement
return?
Only zeroes
Only null values (*)
A null value or a zero depending on the value of the
SALARY column
A null value or a numeric value depending on the value
of the SALARY column
Correct.
22. You query the database with this SQL statement: Mark for
SELECT *
FROM transaction Review
WHERE product_id = 4569; (1) Points
Selection only
Projection only
Selection and projection only (*)
Projection, selection and joining
23. When you use the SELECT clause to list one or two columns Mark for
only from a table and no WHERE clause, which SQL
capability is used?
Review
(1) Points
Joining only
Selection only
Projection only (*)
Projection and Selection
Correct.
24. What would you use in the SELECT clause to return all the Mark for
columns in the table?
Review
(1) Points
Correct.
Section 16
(Answer all questions in this section)
LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25) Review
EMAIL VARCHAR2(50) (1) Points
26. If you write queries using the BETWEEN operator, it does not Mark for
matter in what order you enter the values, i.e. BETWEEN low
value AND high value will give the same result as BETWEEN
high value and low value. True or False? Review
(1) Points
True
False (*)
Correct.
27. Which clause would you include in a SELECT statement to Mark for
restrict the data returned to only the employees in
department 10?
Review
(1) Points
WHERE (*)
FROM
SELECT
IS
Correct.
28. When using the LIKE condition, which symbol represents Mark for
any sequence of characters of any length--zero, one, or
more characters?
Review
(1) Points
_
% (*)
#
&
Correct.
29. You need to combine the FIRST_NAME and LAST_NAME Mark for
columns in the EMPLOYEES table and display the columns as
a combined character string. Which operator should you
use? Review
(1) Points
+
|
|| (*)
AND
Correct.
Review
(1) Points
IN
LIKE (*)
BETWEEN...AND...
IS NULL
Correct.
Correct.
32. When using the LIKE condition to search for _ symbols, which Mark for
character can you use as the default ESCAPE option?
Review
(1) Points
%
^
&
\ (*)
Correct.
SELECT *
FROM employees Review
WHERE department_id IN(10, 20, 30) (1) Points
AND salary > 20000;
Correct.
34. Which of the following commands will display the last name Mark for
concatenated with the job ID from the employees table, separated
by a comma and space, and label the resulting column "Employee
and Title"? Review
(1) Points
SELECT " last name" ||', '|| "job_id" + "Employee and Title"
FROM employees;
SELECT last_name||', '|| job_id "Employee and Title" FROM
employees; (*)
SELECT " last name" ||', '|| "job_id" + "Employee and Title"
FROM emp;
SELECT last_name||","|| job_id "Employee and Title" FROM
employees;
Correct.
36. Which SELECT statement will display both unique and non-unique Mark for
combinations of the MANAGER_ID and DEPARTMENT_ID values from
the EMPLOYEES table?
Review
(1) Points
Correct.
Section 17
(Answer all questions in this section)
37. The ORDER BY clause always comes last. True or False? Mark for
Review
(1) Points
True (*)
False
Correct.
38. Which of the following best describes the meaning of the LIKE Mark for
operator?
Review
(1) Points
Correct.
39. Which statement about the ORDER BY clause is true? Mark for
Review
(1) Points
Correct.
40. You need to change the default sort order of the ORDER BY clause Mark for
so that the data is displayed in reverse alphabetical order. Which
keyword should you include in the ORDER BY clause?
Review
(1) Points
DESC (*)
ASC
SORT
CHANGE
Correct.
41. Which Mark for Review
stateme
nt about
the (1) Points
default
sort
order is
true?
Correct.
42. Which statement about the logical operators is true? Mark for
Review
(1) Points
Correct.
43. Which SELECT statement should you use to limit the display of Mark for
product information to those products with a price of less than 50?
Review
(1) Points
(*)
44. What value will the following SQL statement return? Mark for
SELECT employee_id
FROM employees Review
WHERE employee_id BETWEEN 100 AND 150 (1) Points
OR employee_id IN(119, 175, 205)
AND (employee_id BETWEEN 150 AND 200);
19
No rows will be returned
100, 101, 102, 103, 104, 107, 124, 141, 142, 143, 144, 149
(*)
200, 201, 202, 203, 204, 205, 206
Correct.
SELECT *
FROM employees Review
WHERE salary > 30000 (1) Points
AND department_id = 10
OR email IS NOT NULL;
Correct.
46. You query the database with this SQL statement: Mark for
SELECT price
FROM products Review
WHERE price IN(1, 25, 50, 250) (1) Points
AND (price BETWEEN 25 AND 40 OR price > 50);
1
50
25 (*)
10
250 (*)
47. You need to create a report to display all employees that were Mark for
hired on or before January 1, 1996. The data should display in this
format:
Employee Start Date and Salary Review
14837 - Smith 10-MAY-1992 / 5000 (1) Points
(*)
PLAYERS TABLE:
LAST_NAME VARCHAR2 (20) Review
FIRST_NAME VARCHAR2 (20) (1) Points
SALARY NUMBER(8,2)
TEAM_ID NUMBER(4)
MANAGER_ID NUMBER(9)
POSITION_ID NUMBER(4)
(*)
Correct.
EMPLOYEE_ID NUMBER(9) PK
LAST_NAME VARCHAR2(25) Review
FIRST_NAME VARCHAR2(25) (1) Points
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;
PLAYERS TABLE:
LAST_NAME VARCHAR2 (20) Review
FIRST_NAME VARCHAR2 (20) (1) Points
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 is in the range from 25000 through 100000 and
whose team id is in the range of 1200 through 1500. The results
must be sorted by team id from lowest to highest and then further
sorted by salary from highest to lowest. Which statement should
you use to display the desired result?
(*)
Correct.