0% found this document useful (0 votes)
59 views16 pages

Some Other Links That May Help You! Make Sure To Check If The Answer Is Right!

- The document provides links to resources for a final exam, including practice quizzes and tests. - It recommends using Ctrl+F to find answers quickly on the pages linked. - The test then begins, showing questions from Sections 11-17 with answers to review performance.

Uploaded by

GilangMaulana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views16 pages

Some Other Links That May Help You! Make Sure To Check If The Answer Is Right!

- The document provides links to resources for a final exam, including practice quizzes and tests. - It recommends using Ctrl+F to find answers quickly on the pages linked. - The test then begins, showing questions from Sections 11-17 with answers to review performance.

Uploaded by

GilangMaulana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Some other links that may help you! Make sure to check if the answer is right!

http://quizoracle.blogspot.com/2010/11/final-exam-semester-1.html
http://neobux-and-others.blogspot.com/
http://www.scribd.com/doc/43960178/Test
There are more than just these!
Make sure to save A LOT of time by using Ctrl+F to find the answers on the page!

Test: Final Exam Semester 1


Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 11
(Answer all questions in this section)
1. In an Oracle database, why would 1_TABLE not work as a table name?

The database does not understand all ca

There is no problem here. You can create

Object names must not start with a num


TABLE is a reserved word.
Correct

2. The transformation from an ER diagram to a physical design involves ch

Columns
Tables
Unique Constraints (*)
Primary Key Constraints
Correct
3. Attributes become tables in a database. True or False?

True
False (*)
Correct

4. Which of the following is a valid reason for considering a Subtype Imple

The resulting table will reside in a single

The common access paths for the super

Business functionality, business rules, ac

Most of the relationships are at the supe


Correct

5. In a conceptual model, many-to-many relationships are resolved via a s

Supertype
Intersection Table
Intersection Entity (*)
Subtype
Correct
6. One-to-One relationships are transformed into Check Constraints in the

True
False (*)
Correct
7. A table must have a primary key. True or False?

True
False (*)

Correct

8. If a primary key is a set of columns, then one column must be null. True

True
False (*)
Correct
9. Foreign keys must be null. True or False?

True
False (*)

Incorrect. Refer to Section 11 Lesson


10. The explanation below is a column integrity constraint. True or False?

A column must contain only values consistent with the defined data form

True (*)
False
Correct
Page 1 of 5

Next

Summary

Test: Final Exam Semester 1


Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 11
(Answer all questions in this section)

11. A foreign key cannot refer to a primary key in the same table. True or Fa

True
False (*)

Correct

Section 12
(Answer all questions in this section)

12. What command can be used to create a new row in a table in the datab

CREATE
NEW
ADD
INSERT (*)
Correct.
13. What command will return data from the database to you?

FETCH
GET
SELECT (*)
RETURN
Correct.

14. The _______ clause can be added to a SELECT statement to return a sub

ANYWHERE
WHICH
WHERE (*)
EVERY
Correct.

15. Once you have created a table, it is not possible to alter the definition o

True
False (*)
Correct.
16. The SQL statement ALTER TABLE EMPLOYEES DELETE COLUMN SALARY

True
False (*)
Correct.

17. Systems are always just rolled out as soon as the programming phase is

True
False (*)
Correct.

18. During which phases of the System Development Life Cycle would you t

Build and Transition


Strategy and Analysis
Design and Production
Transition and Production (*)
Correct.

Section 15
(Answer all questions in this section)

19. If a SQL statement returns data from two or more tables, which SQL cap

Selection
Projection

Joining (*)
Insertion
Correct.

20. You want to create a list of all albums that have been produced by the c
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?

SELECT *
FROM albums;
(*)
SELECT alb_title, alb_artist, alb_dates
FROM album;
SELECT alb_title, alb_artist, alb_dates
FROM albums;
SELECT alb_title; alb_artist; alb_date
FROM albums;
Correct.

Previous

Next

Page 2 of 5

Summary

Test: Final Exam Semester 1


Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 15
(Answer all questions in this section)

21. What would you use in the SELECT clause to return all the columns in th

An asterisk (*) (*)


A minus sign (-)
A plus sign (+)
The ALL keyword
Correct.

22. In a SQL statement, which clause specifies one or more columns to be r

SELECT (*)
FROM
WHERE

Any of the above options; you can list co


Incorrect. See Section 15 Lesson 1.
23. You query the database with this SQL statement:
SELECT * FROM students;
Why would you use this statement?

To insert data
To view data (*)
To display the table structure
To delete data
Correct.

24. When listing columns in the SELECT list, what should you use to separat

Commas (*)
Semicolons
Dashes
Underscores
Correct.

Section 16
(Answer all questions in this section)

25. If you write queries using the BETWEEN operator, it does not matter in w

True
False (*)
Correct.
26. The EMPLOYEES table contains these columns:
LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25)
EMAIL VARCHAR2(50)

You are writing a SELECT statement to retrieve the names of employees


SELECT last_name||', '||first_name "Employee Name"
FROM employees;
Which WHERE clause should you use to complete this statement?

WHERE email = NULL;


WHERE email != NULL;
WHERE email IS NULL;
WHERE email IS NOT NULL; (*)
Correct.
27. The Concatenation Operator does which of the following?

Links rows of data together inside the da


Links two or more columns or literals to

Is represented by the asterisk (*) symbo


Separates columns.
Correct.

28. Which operator is used to combine columns of character strings to othe

*
/
+
|| (*)

Correct.

29. You need to combine the FIRST_NAME and LAST_NAME columns in the E

+
|
|| (*)
AND
Correct.

30. You need to display employees whose salary is in the range of 30000 an

IN
LIKE
BETWEEN...AND... (*)
IS NULL
Correct.

Previous

Next

Page 3 of 5

Summary

Test: Final Exam Semester 1


Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 16
(Answer all questions in this section)

31. When using the LIKE condition to search for _ symbols, which character

%
^
&
\ (*)

Correct.

32. You need to display all the rows in the EMPLOYEES table that contain a n

"= NULL"
NULL!
ISNULL
IS NULL (*)
Correct.

33. Which SELECT statement will display both unique and non-unique comb

SELECT manager_id, department_id DIST

SELECT manager_id, department_id FRO

SELECT DISTINCT manager_id, departme

SELECT manager_id, DISTINCT departme


Correct.

34. You want to retrieve a list of customers whose last names begin with the

AND
IN
BETWEEN
LIKE (*)
Correct.

35. You want to retrieve a list of customers whose last names begin with the

% (*)
~
#
*

Correct.

36. Which of the following commands will display the last name concatenat

SELECT " last name" ||', '|| "job_id" + "Em

SELECT last_name||', '|| job_id "Employe

SELECT " last name" ||', '|| "job_id" + "Em

SELECT last_name||","|| job_id "Employe


Correct.

Section 17
(Answer all questions in this section)
37. The EMPLOYEES table contains these columns:
EMPLOYEE_ID NUMBER(9) PK
LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25)
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;
How will the results differ?

One of the statements will return a synta

One of the statements will eliminate all d

There is no difference in the result betwe

The statements will sort on different colu


Incorrect! See Section 17 Lesson 3.
38. The PLAYERS table contains these columns:

PLAYERS TABLE:
LAST_NAME VARCHAR2 (20)
FIRST_NAME VARCHAR2 (20)
SALARY NUMBER(8,2)
TEAM_ID NUMBER(4)
MANAGER_ID NUMBER(9)
POSITION_ID NUMBER(4)

You want to display all players' names with position 6900 or greater.
You want the players names to be displayed alphabetically by last name
Which statement should you use to achieve the required results?

SELECT last_name, first_name


FROM players
WHERE position_id >= 6900
ORDER BY last_name, first_name;
(*)
SELECT last_name, first_name
FROM players
WHERE position_id > 6900
ORDER BY last_name, first_name;
SELECT last_name, first_name
FROM players
WHERE position_id <= 6900
ORDER BY last_name, first_name;
SELECT last_name, first_name
FROM players
WHERE position_id >= 6900
ORDER BY last_name DESC, first_name;
Correct.
39. Evaluate this SQL statement:
SELECT e.employee_id, e.last_name, e.first_name, m.manager_id
FROM employees e, employees m
ORDER BY e.last_name, e.first_name
WHERE e.employee_id = m.manager_id;

This statement fails when executed. Which change will correct the prob

Reorder the clauses in the query. (*)


Remove the table aliases in the WHERE

Remove the table aliases in the ORDER B


Include a HAVING clause.
Correct.

40. Which statement about the default sort order is true?

The lowest numeric values are displayed

The earliest date values are displayed fir


Null values are displayed first.

Character values are displayed in revers


Correct.

Previous

Next

Page 4 of 5

Summary

Test: Final Exam Semester 1


Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17
(Answer all questions in this section)
41. From left to right, what is the correct order of Precedence?

Arithmetic, Concatenation, Comparison,


NOT, AND, OR, Arithmetic
Arithmetic, NOT, Logical, Comparison
Arithmetic, NOT, Concatenation, Logical
Correct.
42. Which logical operator returns TRUE if either condition is true?

OR (*)
AND
NOT
BOTH
Correct.

43. Which statement about the logical operators is true?

The order of operator precedence is AND

The order of operator precedence is AND

The order of operator precedence is NOT

The order of operator precedence is NOT


Correct.
44. The ORDER BY clause always comes last. True or False?

True (*)
False
Correct.
45. Which of the following are TRUE regarding the logical AND operator?

TRUE AND TRUE return FALSE


TRUE AND FALSE return TRUE
FALSE AND TRUE return NULL
TRUE AND FALSE return FALSE (*)
Correct.
46. What value will the following SQL statement return?
SELECT employee_id
FROM employees
WHERE employee_id BETWEEN 100 AND 150
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,
200, 201, 202, 203, 204, 205, 206

Correct.
47. Which SELECT statement should you use to limit the display of product

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;
Correct.
48. Evaluate this SELECT statement:
SELECT *
FROM employees
WHERE salary > 30000
AND department_id = 10
OR email IS NOT NULL;
Which statement is true?

The OR condition will be evaluated befor

The AND condition will be evaluated bef

The OR and AND conditions have the sam

The OR and AND conditions have the sam


Correct.
49. Evaluate this SELECT statement:
SELECT last_name, first_name, email
FROM employees
ORDER BY email;

If the EMAIL column contains null values, which statement is true?

Null email values will be displayed first i

Null email values will be displayed last in

Null email values will not be displayed in


The result will not be sorted.
Correct.
50. Evaluate this SELECT statement:
SELECT first_name, last_name, email
FROM employees
ORDER BY last_name;
Which statement is true?

The rows will not be sorted.

The rows will be sorted alphabetically by

The rows will be sorted in reverse alphab

The rows will be sorted alphabetically by


Correct.

Previous

Page 5 of 5

Summary

You might also like