Professional Documents
Culture Documents
True
False (*)
4. The explanation below is a User Defined integrity rule and must therefore be
manually coded, the Database cannot enforce this rule automatically:
A primary key must be unique, and no part of the primary key can be null. True o
r False?
Mark for Review
(1) Points
True
False (*)
5. A table must have a primary key. True or False? Mark for Review
(1) Points
True
False (*)
6. Foreign keys must be null. True or False? Mark for Review
(1) Points
True
False (*)
7. When mapping supertypes, relationships at the supertype level transform as u
sual. Relationships at subtype level are implemented as foreign keys, but the fo
reign key columns all become mandatory. True or False? Mark for Review
(1) Points
True
False (*)
8. In a physical data model, an attribute becomes a _____________. Mark for R
eview
(1) Points
Table
Foreign Key
Constraint
Column (*)
9. The transformation from an ER diagram to a physical design involves changing
terminology. Secondary Unique Identifiers become Mark for Review
(1) Points
Columns
Tables
Unique Constraints (*)
Primary Key Constraints
10. Why would this table name NOT work in an Oracle database? this_year_end+ne
xt_year Mark for Review
(1) Points
Table names must begin with an alphabetic character
Too long
The Plus sign + is not allowed in object names (*)
None of the above
11. 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
12. What command can be used to create a new row in a table in the database? M
ark for Review
(1) Points
CREATE
NEW
ADD
INSERT (*)
13. What command will return data from the database to you? Mark for Review
(1) Points
FETCH
GET
SELECT (*)
RETURN
14. The f_customers table contains the following data:
ID Name Address City State Zip
1 Cole Bee 123 Main Street Orlando FL 32838
2 Zoe Twee 1009 Oliver Avenue Boston MA 02116
3 Sandra Lee 22 Main Street Tampa FL 32444
1 (*)
2
15. The SQL statement ALTER TABLE EMPLOYEES DELETE COLUMN SALARY is a valid st
atement. True or False? Mark for Review
(1) Points
True
False (*)
16. You want to create a report that displays all employees who were hired befo
re January 1, 2000 and whose annual salaries are greater than 50000.
The EMPLOYEES table contains these columns:
EMPLOYEE_ID VARCHAR2(5) PRIMARY KEY
LAST_NAME VARCHAR2(35)
HIREDATE DATE
DEPARTMENT_ID NUMBER(4)
The SALARY table contains these columns:
SALARYID VARCHAR2(5) PRIMARY KEY
SALARY NUMBER(5, 2)
EMPLOYEE_ID VARCHAR2(5) FOREIGN KEY
Which query should you issue?
Mark for Review
(1) Points
SELECT last_name, hiredate, salary
FROM employees NATURAL JOIN salary USING employee_id
WHERE hiredate < 01-jan-00 AND salary > 50000;
IS NULL
23. You need to display employees with salaries that are at least 30000 or high
er. Which comparison operator should you use? Mark for Review
(1) Points
>
"=>"
>= (*)
!=
24. You want to retrieve a list of customers whose last names begin with the le
tters Fr . Which symbol should you include in the WHERE clause of your SELECT st
atement to achieve the desired result? Mark for Review
(1) Points
% (*)
~
#
*
25. The PLAYERS table contains these columns:
PLAYER_ID NUMBER(9)
LAST_NAME VARCHAR2(20)
FIRST_NAME VARCHAR2 (20)
TEAM_ID NUMBER (4)
MANAGER_ID NUMBER (9)
POSITION_ID NUMBER (4)
Which SELECT statement should you use if you want to display unique combinations
of the TEAM_ID and MANAGER_ID columns?
Mark for Review
(1) Points
SELECT * FROM players;
SELECT team_id, manager_id FROM players;
SELECT DISTINCT team_id, manager_id FROM players; (*)
SELECT team_id, DISTINCT manager_id FROM players;
SELECT team_id, manager_id DISTINCT FROM players;
26. Evaluate this SELECT statement:
SELECT *
FROM employees
WHERE department_id IN(10, 20, 30)
AND salary > 20000;
Which values would cause the logical condition to return TRUE?
Mark for Review
(1) Points
DEPARTMENT_ID = 10 and SALARY = 20000
The rows will be sorted in reverse alphabetical order by the LAST_NAME value
s.
The rows will be sorted alphabetically by the FIRST_NAME and then the LAST_N
AME values
41. Evaluate this SELECT statement:
SELECT last_name, first_name, salary
FROM employees;
How will the results of this query be sorted?
Mark for Review
(1) Points
The database will display the rows in whatever order it finds it in the data
base, 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.