Professional Documents
Culture Documents
True
False (*)
Correct
2. Which of the following are reasons why you should consider using a Subtype
Implementation? Mark for Review
(1) Points
The resulting table will reside in a single database and be used by just ONE user.
When the common access paths for the supertypes are different.
Business functionality and business rules, access paths and frequency of access are all
very different between subtypes. (*)
Correct
True
False (*)
Correct
Supertype
Intersection Entity
Subtype
Columns having Primary Keys, Foreign Keys, Unique Keys and Check constraints
defined in the database.
Tables having Primary Keys, Foreign Keys, Unique Keys and Check constraints
defined in the database. (*)
6. 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
7. A table must have a primary key. True or False? Mark for Review
(1) Points
True
False (*)
Correct
8. Identify all of the incorrect statements that complete this sentence: A primary key is:
(Choose three) Mark for Review
(1) Points
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 another table (*)
Correct
Too long
Correct
Section 12
11. In an Oracle database, why would 1_TABLE not work as a table name? Mark for
Review
(1) Points
Object names must not start with a number. They must begin with a letter (*)
Correct
Section 13
12. What command will return data from the database to you? Mark for Review
(1) Points
FETCH
GET
SELECT (*)
RETURN
Correct.
13. The DESCRIBE command returns all rows from a table. True or False? Mark for
Review
(1) Points
True
False (*)
Correct.
Section 16
14. Which SQL keyword specifies that an alias will be substituted for a column name in
the output of a SQL query? Mark for Review
(1) Points
AS (*)
OR
AND
SUBSTITUTE
Correct.
15. In a SQL statement, which clause specifies one or more columns to be returned 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 SELECT
statement.
Correct.
16. The SELECT statement retrieves information from the database. In a SELECT
statement, you can do all of the following EXCEPT: Mark for Review
(1) Points
Projection
Manipulation (*)
Joining
Selection
Correct.
17. When you use the SELECT clause to list one or two columns only from a table and
no WHERE clause, which SQL capability is used? Mark for Review
(1) Points
Joining only
Selection only
Correct.
Which SQL SELECT statement capabilities are achieved when this statement is
executed?
Mark for Review
(1) Points
Projection only
Correct.
19. Which SQL statement will return an error? Mark for Review
(1) Points
8 (*)
10
13
Correct.
Section 16
21. Would it be a good idea to model age as an attribute of STUDENT? Mark for
Review
(1) Points
Yes
Maybe it could stop us having to calculate someone's age every time we need it
Sometimes
Correct
22. Any Non-UID must be dependant on the entire UID. True or False? Mark for
Review
(1) Points
True (*)
False
Correct
Section 17
23. You need to display all the employees whose last name starts with the letters Sm .
Which WHERE clause should you use? Mark for Review
(1) Points
% (*)
25. 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
employee 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
Correct.
26. You need to display all the values in the EMAIL column that contains the
underscore (_) character as part of that email address. The WHERE clause in your
SELECT statement contains the LIKE operator. What must you include in the LIKE
operator? Mark for Review
(1) Points
The ESCAPE option (\) and one or more percent signs (%)
How will the heading for the SALARY column appear in the display by default in Oracle
Application Express?
Mark for Review
(1) Points
The heading will display with the first character capitalized and centered.
The heading will display with the first character capitalized and left justified.
The heading will display as uppercase and centered. (*)
Correct.
28. Which operator is used to combine columns of character strings to other columns?
Mark for Review
(1) Points
|| (*)
29. Which comparison condition would you use to select rows that match a character
pattern? Mark for Review
(1) Points
IN
LIKE (*)
ALMOST
SIMILAR
Correct.
30. Which statement best describes how column headings are displayed by default in
Oracle Application Express: Mark for Review
(1) Points
Section 17
31. You need to display only unique combinations of the LAST_NAME and
MANAGER_ID columns in the EMPLOYEES table. Which keyword should you include
in the SELECT clause? Mark for Review
(1) Points
ONLY
UNIQUE
DISTINCT (*)
DISTINCTROW
32. Which symbol represents the not equal to condition? Mark for Review
(1) Points
'+'
!= (*)
33. 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 (*)
Separates columns.
You want to display product costs with these desired results: 1. The cost displayed for
each product is increased by 10 percent. 2. The product location id must be 4859, 9789,
or 9898. 3. Ten percent of the original cost is less than $10. Which statement should you
issue?
Mark for Review
(1) Points
35. If you write queries using the BETWEEN operator it does not 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? Mark for Review
(1) Points
True
False (*)
Correct.
The first statement will NOT display values from all of the rows in the EMPLOYEES
table
Section 18
37. Which logical operator returns TRUE if either condition is true? Mark for Review
(1) Points
OR (*)
AND
NOT
BOTH
Correct.
38. Which clause would you include in a SELECT statement to sort the rows returned
by the LAST_NAME column? Mark for Review
(1) Points
ORDER BY (*)
WHERE
FROM
HAVING
Correct.
39. Which statement about the logical operators is true? Mark for Review
(1) Points
Correct.
40. The ORDER BY clause always comes last. True or False? Mark for Review
(1) Points
True (*)
False
Correct.
Section 18
41. Which of the following is TRUE regarding the logical AND operator? Mark for
Review
(1) Points
Correct.
42. Which statement about the ORDER BY clause is true? Mark for Review
(1) Points
The ORDER BY clause can only contain columns that are included in the SELECT
list.
The ORDER BY clause should immediately precede the FROM clause in a SELECT
statement
Correct.
This statement fails when executed. Which change will correct the problem?
Mark for Review
(1) Points
Correct.
The database will display the rows in whatever order it finds it in the database, so no
particular order. (*)
Correct.
46. Evaluate this SELECT statement:
SELECT last_name, first_name, email
FROM employees
ORDER BY email;
Correct.
Which operator is the equivalent of the OR conditions used in this SELECT statement?
Mark for Review
(1) Points
IN (*)
AND
LIKE
Correct.
48. You query the database with this SQL statement:
SELECT price
FROM products
WHERE price IN(1, 25, 50, 250)
AND (price BETWEEN 25 AND 40 OR price > 50);
50
25 (*)
10
250 (*)
100
Correct.
50. Which SELECT statement should you use to limit the display of product
information to those products with a price of less than 50? Mark for Review
(1) Points
Correct.