Section 12 Lesson 1
Section 12 Lesson 1
1. A table must have at least one candidate key, as well as its primary key. True or False?
True
False (*)
Section 12 Lesson 1
2. The explanation below is a column integrity constraint: A column must contain only values consistent with the
defined data format of the column. True or False?
True (*)
False
Section 12 Lesson 1
3. The explanation below is a userdefined integrity rule: A primary key must be unique, and no part of the primary
key can be null. True or False?
True
False (*)
Section 12 Lesson 1
True
False (*)
Section 12 Lesson 2
Column
Primary Key or Unique Key (*)
Check Constraint or Unique Key
Foreign Key (*)
Section 12 Lesson 2
6. The transformation from an ER diagram to a physical design involves changing terminology. Secondary Unique
Identifiers becomes
Columns
Tables
Unique Constraints (*)
Primary Key Constraints
Section 12 Lesson 2
Table
Foreign Key
Constraint
Column (*)
Section 12 Lesson 3
Supertype
Intersection Table (*)
Intersection Entity
Subtype
Section 12 Lesson 3
9. What do you create when you transform a one to one relationship from your ER diagram into a physical design?
Section 12 Lesson 4
10. When mapping supertypes, relationships at the supertype level transform as usual. Relationships at subtype level
are implemented as foreign keys, but the foreign key columns all become mandatory. True or False?
True
False (*)
Section 12 Lesson 4
11. Which of the following are reasons why you should consider using a Subtype Implementation?
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. (*)
Most of the relationships are at the supertype level
Section 13 Lesson 1
12. What command will return data from the database to you?
FETCH
GET
SELECT (*)
RETURN
Section 13 Lesson 1
13. The DESCRIBE command returns all rows from a table. True or False?
True
False (*)
Section 16 Lesson 1
If the RAISE_PERCENT 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
Section 16 Lesson 1
15. 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?
Joining only
Selection only
Projection only (*)
Projection and Selection
Section 16 Lesson 1
16. Which statement best describes how arithmetic expressions are handled?
Section 16 Lesson 1
17. The SELECT statement retrieves information from the database. In a SELECT statement, you can do all of the
following EXCEPT:
Projection
Manipulation (*)
Joining
Selection
Section 16 Lesson 1
To insert data
To view data (*)
To display the table structure
To delete data
Section 16 Lesson 1
Section 16 Lesson 1
6
8 (*)
10
13
Section 16 Lesson 3
21. All computers in the world speaks the same languages, so you only need to learn one programming language -
Oracle SQL. True or False?
True
False (*)
Section 16 Lesson 3
22. In a SELECT statement ADDITIONS are evaluated before Multiplications. True or False?
True
False (*)
Section 17 Lesson 1
23. You need to display employees whose salary is in the range of 10000 through 25000 for employees in department
50 . What does the WHERE clause look like?
WHERE department_id = 50
AND salary BETWEEN 25001 AND 10001
WHERE department_id = 50
AND salary BETWEEN 25000 AND 10000 (*)
Section 17 Lesson 1
24. When using the LIKE condition, which symbol represents any sequence of none, one or more characters?
_
% (*)
#
&
Section 17 Lesson 1
25. Which operator is used to combine columns of character strings to other columns?
*
/
+
|| (*)
Section 17 Lesson 1
Section 17 Lesson 1
27. When using the LIKE condition to search for _ symbols, which character can you use as the ESCAPE option?
%
^
&
\ (*)
Section 17 Lesson 1
28. You need to display employees whose salary is in the range of 30000 and 50000. Which comparison operator
should you use?
IN
LIKE
BETWEEN...AND... (*)
IS NULL
Section 17 Lesson 2
29. What will the result of the following SELECT statement be:
SELECT last_name, salary, salary + 300
FROM employees;
Display the last name, salary and the results of adding 300 to each salary for all the employees (*)
Modify the salary column by adding 300 and displaying the last name, salary and the new salary.
Modify the salary column by adding 300 and only display the last name and the new salary.
Display the last name, salary and the results of adding 300 to the salary of the first employee row
Section 17 Lesson 2
Which SELECT statement should you use if you want to display unique combinations of the TEAM_ID and
MANAGER_ID columns?
Section 17 Lesson 2
31. Which of the following commands will display the last name concatenated with the job ID from the employees
table, separated by a comma and space, and label the resulting column "Employee and Title"?
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;
Section 17 Lesson 2
32. You need write a SELECT statement that should only return rows that contain 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 values?
=
!=
IN (*)
BETWEEN..AND..
Section 17 Lesson 2
33. You need to display all the values in the EMAIL column that contains the underscore (_) character. The WHERE
clause in your SELECT statement contains the LIKE operator. What must you include in the LIKE operator?
The ESCAPE option (\) and one or more percent signs (%)
The (+) operator
A percent sign (%)
The ESCAPE option (\) (*)
Section 17 Lesson 3
Section 17 Lesson 3
Section 17 Lesson 3
You are writing a SELECT statement to retrieve the names of employees that have an email address.
Section 18 Lesson 1
True (*)
False
Section 18 Lesson 1
Section 18 Lesson 1
39. You need to override the default sort order of the ORDER BY clause so that the data is displayed in reverse
alphabetical order. Which keyword should you include in the ORDER BY clause?
DESC (*)
ASC
SORT
CHANGE
Section 18 Lesson 1
40. Which of the following are TRUE regarding the logical AND operator?
Section 18 Lesson 1
Section 18 Lesson 1
42. Which of the following best describes the meaning of the LIKE operator?
Section 18 Lesson 2
Section 18 Lesson 2
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
Section 18 Lesson 2
45. Which SELECT statement should you use to limit the display of product information to those products with a
price of less than 50?
SELECT product_id, product_name FROM products WHERE price < 50; (*)
SELECT product_id, product_name FROM products HAVING price < 50;
SELECT product_id, product_name FROM products WHERE price <= 50;
SELECT product_id, product_name FROM products GROUP BY price < 50;
SELECT product_id, product_name FROM products WHERE price < 50.00 GROUP BY price;
Section 18 Lesson 2
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?
47. You need to create a report to display all employees that were hired on or after January 1, 1996. The data should
display in this format:
Employee Start Date and Salary
14837 - Smith 10-MAY-92 / 5000
Section 18 Lesson 2
The database will display the rows in whatever order it finds it in the database, so no particular order. (*)
The results will be sorted ascending by the LAST_NAME column only.
The results will be sorted ascending by LAST_NAME and FIRST_NAME only.
The results will be sorted ascending by LAST_NAME, FIRST_NAME, and SALARY.
Section 18 Lesson 3
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?
Section 18 Lesson 3
This statement fails when executed. Which change will correct the problem?