Oracle Final Test
Oracle Final Test
Oracle Final Test
Identify all of the incorrect statements that complete this sentence: A prim
ary 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 tab
le
A set of columns in one table that uniquely identifies each row in another t
able (*)
Only one column that must be null (*)
Correct
Correct
3. A table must have at least one candidate key, as well as its primary key.
True or False? Mark for Review
(1) Points
True
False (*)
Correct
4. If a primary key is a set of columns then one column must be null. True or
False? Mark for Review
(1) Points
True
False (*)
Correct
Correct
Correct
Foreign Key
Constraint
Column (*)
Correct
9. The Oracle Database can implement a many to many relationship. You simply
create two foreign keys between the two tables. True or False? Mark for Review
(1) Points
True
False (*)
Correct
True
False (*)
Correct
11. When translating an arc relationship to a physical design, you must turn th
e arc relationships into foreign keys. Assuming you are implementing an Exclusiv
e Design, you must also create two Unique Key Constraints to ensure the Arc is i
mplemented correctly. True or False? Mark for Review
(1) Points
True
False (*)
Correct
Section 12
12. The _______ clause can be added to a SELECT statement to return a subset
of the data. Mark for Review
(1) Points
ANYWHERE
WHICH
WHERE (*)
EVERY
Correct.
13. What command can be used to create a new row in a table in the database?
Mark for Review
(1) Points
CREATE
NEW
ADD
INSERT (*)
Correct.
14. What command will return data from the database to you? Mark for Review
(1) Points
FETCH
GET
SELECT (*)
RETURN
Correct.
15. The SQL statement ALTER TABLE EMPLOYEES DELETE COLUMN SALARY is a valid s
tatement. True or False? Mark for Review
(1) Points
True
False (*)
21. If a SQL statement returns data from two or more tables, which SQL capabi
lity is being used? Mark for Review
(1) Points
Selection
Projection
Joining (*)
Insertion
Correct.
Correct.
23. Which SQL statement will return an error? Mark for Review
(1) Points
SEL * FR sky; (*)
select star from sky;
Correct.
24. You want to create a list of all albums that have been produced by the co
mpany. The list should include the title of the album, the artist's name, and th
e date the album was released. The ALBUMS table includes the following columns:
ALB_TITLE VARCHAR2(150) NOT NULL
ALB_ARTIST VARCHAR2(150) NOT NULL
ALB_DATE DATE NOT NULL
Which statement can you use to retrieve the necessary information?
Mark for Review
(1) Points
SELECT *
FROM albums;
(*)
Correct.
Section 16
25. Which comparison condition would you use to select rows that match a char
acter pattern? Mark for Review
(1) Points
IN
LIKE (*)
ALMOST
SIMILAR
Correct.
26. The Concatenation Operator does which of the following? Mark for Review
(1) Points
Links rows of data together inside the database.
Links two or more columns or literals to form a single output column (*)
Is represented by the asterisk (*) symbol
Separates columns.
Correct.
27. You need to display all the rows in the EMPLOYEES table that contain a nu
ll value in the DEPARTMENT_ID column. Which comparison operator should you use?
Mark for Review
(1) Points
"= NULL"
NULL!
ISNULL
IS NULL (*)
Correct.
28. You need to display employees whose salary is in the range of 30000 and 5
0000. Which comparison operator should you use? Mark for Review
(1) Points
IN
LIKE
BETWEEN...AND... (*)
IS NULL
Correct.
29. When using the LIKE condition to search for _ symbols, which character ca
n you use as the default ESCAPE option? Mark for Review
(1) Points
%
^
&
\ (*)
Correct.
Correct.
31. Which of the following commands will display the last name concatenated wit
h the job ID from the employees table, separated by a comma and space, and label
the resulting column "Employee and Title"? Mark for 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.
Correct.
33. If the EMPLOYEES table has the following columns, and you want to write a
SELECT statement to return the employee last name and department number for emp
loyee number 176, which of the following SQL statements should you use?
Name Type Length
EMPLOYEE_ID NUMBER 22
FIRST_NAME VARCHAR2 20
LAST_NAME VARCHAR2 25
EMAIL VARCHAR2 25
PHONE_NUMBER VARCHAR2 20
SALARY NUMBER 22
COMMISSION_PCT NUMBER 22
MANAGER_ID NUMBER 22
DEPARTMENT_ID NUMBER 22
34. You need write a SELECT statement that should only return rows that conta
in 34, 46, or 48 for the DEPARTMENT_ID column. Which operator should you use in
the WHERE clause to compare the DEPARTMENT_ID column to this specific list of va
lues? Mark for Review
(1) Points
=
!=
IN (*)
BETWEEN..AND..
Correct.
Correct
36. Any Non-UID must be dependant on the entire UID. True or False? Mark for
Review
(1) Points
True (*)
False
Correct
Section 17
37. The ORDER BY clause always comes last. True or False? Mark for Review
(1) Points
True (*)
False
Correct.
38. Which comparison condition means "Less Than or Equal To"? Mark for Revie
w
(1) Points
"=)"
"+<"
">="
"<=" (*)
Correct.
39. Which of the following are TRUE regarding the logical AND operator? Mark
for Review
(1) Points
TRUE AND TRUE return FALSE
TRUE AND FALSE return TRUE
FALSE AND TRUE return NULL
TRUE AND FALSE return FALSE (*)
Correct.
40. From left to right, what is the correct order of Precedence? Mark for Re
view
(1) Points
Arithmetic, Concatenation, Comparison, OR (*)
NOT, AND, OR, Arithmetic
Arithmetic, NOT, Logical, Comparison
Arithmetic, NOT, Concatenation, Logical
Correct.
41. Which logical operator returns TRUE if either condition is true? Mark for
Review
(1) Points
OR (*)
AND
NOT
BOTH
Correct.
42. Which statement about the logical operators is true? Mark for Review
(1) Points
The order of operator precedence is AND, OR, and NOT.
The order of operator precedence is AND, NOT, and OR.
The order of operator precedence is NOT, OR, and AND.
Correct.
LIKE
BETWEEN ... AND ...
Correct.
Correct.
Correct.
46. You attempt to query the database with this SQL statement:
SELECT product_id "Product Number", category_id "Category", price "Price"
FROM products
WHERE "Category" = 5570
ORDER BY "Product Number";
This statement fails when executed. Which clause contains a syntax error?
Mark for Review
(1) Points
Correct.
Correct.
Correct.
Correct.
1 (*)
2
Correct.
Section 13
17. During which phases of the System Development Life Cycle would you test t
he system before rolling it out to the users? Mark for Review
(1) Points
Build and Transition
Strategy and Analysis
Design and Production
Correct.
18. Systems are always just rolled out as soon as the programming phase is fi
nished. No further work is required once the development is finished. True or Fa
lse? Mark for Review
(1) Points
True
False (*)
Correct.
Section 15
19. In a SQL statement, which clause specifies one or more columns to be retu
rned by the query? Mark for Review
(1) Points
SELECT (*)
FROM
WHERE
Any of the above options, you can list columns wherever you want to in a SEL
ECT statement.
Correct.