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

Final Exam 23okt2020

The document contains a multiple choice quiz about Oracle SQL Data Modeler and SQL concepts. It includes 45 questions across various sections on topics like logical and relational modeling, database design, SQL statements, transactions, and database concepts. The questions test knowledge of how to engineer models to relational structures, write SQL queries using joins, constraints, and functions, and core database principles around transactions, consistency, and SQL processing.

Uploaded by

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

Final Exam 23okt2020

The document contains a multiple choice quiz about Oracle SQL Data Modeler and SQL concepts. It includes 45 questions across various sections on topics like logical and relational modeling, database design, SQL statements, transactions, and database concepts. The questions test knowledge of how to engineer models to relational structures, write SQL queries using joins, constraints, and functions, and core database principles around transactions, consistency, and SQL processing.

Uploaded by

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

1.

The Oracle SQL Data Modeler enables you to do all of the following except:
Mark for Review

(1) Points
Store application data (*)
Create process, logical, relational and physical models
Capture business rules and information
Store metadata information
Incorrect. Refer to Section 4 Lesson 1.
2. In Oracle SQL Data Modeler, the attribute that you assign as primary UID is
automatically set to a mandatory attribute and will be engineered to a primary key
in the relational model.
Mark for Review

(1) Points
True (*)
False
Correct
3. A Relational model is closer to the implementation solution, facilitates
discussion and forms the basis for the physical database design.
Mark for Review

(1) Points
True (*)
False
Correct
4. The steps to convert a Logical model to a Relational model using the Oracle SQL
Developer Data Modeler are :
Mark for Review

(1) Points
Select the Logical model, Click the Engineer to Relational Model icon, Accept
defaults, Click Engineer (*)
Click the Engineer to Relational Model icon, Select the Logical model, Click
Engineer, Accept defaults.
Select the Logical model, Accept defaults, Click the Engineer to Relational Model
icon, Click Engineer
None of the above.
Incorrect. Refer to Section 4 Lesson 2.
Section 5
(Answer all questions in this section)
5. Foreign key constraints are named using the ______________ of both tables.
Mark for Review

(1) Points
full table name
UID suffix
foreign key name
short table name (*)

6. Constraints should be given meaningful names to make them easier to reference.


Mark for Review

(1) Points
True (*)
False
Incorrect. Refer to Section 5 Lesson 2.
7. A ______________ in Oracle SQL Developer Data Modeler is a set of accepted terms
that can be used in the design.
Mark for Review

(1) Points
table
template
glossary (*)
validation rule
Incorrect. Refer to Section 5 Lesson 1.
8. Each attribute in an entity maps to a _________ in a table.
Mark for Review

(1) Points
instance
row
column (*)
primary key
Incorrect. Refer to Section 5 Lesson 1.
Section 6
(Answer all questions in this section)
9. You can name a constraint or the Oracle server generates a name by using the
SYS_Cn format.
Mark for Review

(1) Points
True (*)
False
Incorrect. Refer to Section 6 Lesson 3.
10. DDL means :
Mark for Review

(1) Points
Data Distribution Language
Data Definers Language
Data Definition Language (*)
None of the above.

11. To issue a CREATE TABLE statement, you must have the __________ privilege.
Mark for Review

(1) Points
DISTRIBUTE TABLE
CREATE TABLE (*)
Both
None
Incorrect. Refer to Section 6 Lesson 3.
12. When you _______ a table, the database loses all the data in the table.
Mark for Review

(1) Points
SELECT
DROP (*)
ERASE
ALTER
Correct
13. Table names and column names must begin with a number and should be 1–30
characters long.
Mark for Review

(1) Points
True
False (*)
Correct
14. According to the rules of precedence which operator will be evaluated first?
Mark for Review

(1) Points
AND (*)
OR
Both are on the same level of precedence.
Incorrect. Refer to Section 6 Lesson 7.
15. The _______ condition tests for nulls.
Mark for Review

(1) Points
IS NULL (*)
NULLABLE
NULL
ISN'T NULL

16. Which operator is used to display rows based on an ordered range of values?
Mark for Review

(1) Points
IN
LIKE
BETWEEN (*)
NOT NULL
Incorrect. Refer to Section 6 Lesson 7.
17. The ______ operator requires either of the component conditions to be true.
Mark for Review

(1) Points
OR (*)
AND
EITHER
BETWEEN
Incorrect. Refer to Section 6 Lesson 7.
18. Character strings and dates in the WHERE clause must be enclosed with single
quotation marks (' ').
Mark for Review

(1) Points
True (*)
False
Correct
19. Which SQL key word is used to do ranking in top-n-analysis
Mark for Review

(1) Points
GROUP BY
ROWNUM (*)
WHERE
ORDER BY
Correct
20. Which statements will execute successfully?
(Choose 2)
Mark for Review
(1) Points
SELECT first_name, last_name, first_name||last_name fullname
FROM employees
ORDER BY fullname;
(*)
SELECT employee_id, first_name, last_name
FROM employees
ORDER BY employee_id DESCEND;

SELECT first_name, last_name


FROM employees
ORDER BY employee_id DES;

SELECT employee_id, last_name, job_id, department_id, hire_date


FROM employees
ORDER BY 3;
(*)

21. Which character is used as a substitution variable in APEX?


Mark for Review

(1) Points
*
;
: (*)
&
Incorrect. Refer to Section 6 Lesson 8.
22. The following statement will execute successfully (true or false):
SELECT employee_id, last_name, salary*12 annsal
FROM employees
ORDER BY annsal ;
Mark for Review

(1) Points
True (*)
False
Correct
23. Which of the following statements is syntactically correct?
Mark for Review

(1) Points
SELECT e.employee_id, e.last_name, e.department_id, d.department_id, d.location_id
FROM employees e JOIN departments d
ON (e.department_id = d.department_id)
AND e.manager_id = 149 ;
SELECT e.employee_id, e.last_name, e.department_id, d.department_id, d.location_id
FROM employees e JOIN departments d
ON (e.department_id = d.department_id)
WHERE e.manager_id = 149 ;
Both statements are syntactically correct. (*)
Neither statement is syntactically correct.
Correct
24. What type of join is the following statement?
SELECT e.EMPLOYEE_ID, e.LAST_NAME, d.DEPARTMENT_ID, d.DEPARTMENT_NAME,
d.LOCATION_ID
FROM EMPLOYEES e, DEPARTMENTS d;
Mark for Review

(1) Points
INNER JOIN
CROSS JOIN (*)
OUTER JOIN
NATURAL JOIN
Incorrect. Refer to Section 6 Lesson 9.
25. The ________ join clause is based on all the columns in the two tables that
have the same name and the same datatype.
Mark for Review

(1) Points
NATURAL JOIN (*)
CROSS JOIN
USING
OUTER JOIN

26. Why will the following statement result in an error?


SELECT l.city, d.department_name
FROM locations l JOIN departments d
USING (location_id)
WHERE d.location_id = 1400;
Mark for Review

(1) Points
The field in the USING clause cannot have a qualifier. (*)
Syntax of the USING clause is incorrect.
WHERE clause cannot be used in a query with USING.
There is nothing wrong - this will run correctly.
Incorrect. Refer to Section 6 Lesson 9.
27. Which of the following statements is an example of a SELF JOIN?
Mark for Review

(1) Points
SELECT e.employee_id, e.last_name, e.department_id, d.department_id, d.location_id
FROM employees e JOIN departments d
ON (e.department_id = d.department_id);
SELECT e.employee_id, e.last_name, e.department_id, d.department_id, d.location_id
FROM employees e JOIN departments d
ON (e.department_id = d.department_id)
AND e.manager_id = 149 ;
SELECT department_id, department_name,location_id, city
FROM departments NATURAL JOIN locations;
SELECT worker.last_name emp, manager.last_name mgr
FROM employees worker JOIN employees manager
ON (worker.manager_id = manager.employee_id); (*)
Correct
28. The CARTESIAN or CROSS join gets created when a join condition is omitted.
Mark for Review

(1) Points
True (*)
False
Incorrect. Refer to Section 6 Lesson 9.
29. In the APEX application a ______ is a collection of logical structures of data.
A _______ is owned by a database user and has the same name as that user.
Mark for Review

(1) Points
entity
table
schema (*)
file
Incorrect. Refer to Section 6 Lesson 1.
30. Application programs enable us to ________.
Mark for Review

(1) Points
Check email.
Create documents
Edit photogrphs
All of the above. (*)

31. In a basic query, following the word FROM comes the fields to be displayed.
Mark for Review

(1) Points
True
False (*)
Incorrect. Refer to Section 6 Lesson 1.
32. A collection of DML statements that form a logical unit of work is called a
______________.
Mark for Review

(1) Points
transaction (*)
statement
command
block
Incorrect. Refer to Section 6 Lesson 4.
33. The UPDATE statement modifies the values of a specific row or rows if the
_______ clause is specified.
Mark for Review

(1) Points
MODIFY
VALUE
SET (*)
WHERE
Incorrect. Refer to Section 6 Lesson 4.
34. The TRUNCATE statement is a data definition language (DDL) statement and
generates no rollback information.
Mark for Review

(1) Points
True (*)
False
Correct
35. ___________________ is used to add, modify and delete data.
Mark for Review

(1) Points
Data Management Language
Data Definition Language
Data Manipulation Language (*)
Data Control Language

36. When you have constraints in place on columns, an error is returned if you try
to violate the constraint rule.
Mark for Review
(1) Points
True (*)
False
Incorrect. Refer to Section 6 Lesson 4.
37. The Oracle server ensures data consistency based on transactions.
Mark for Review

(1) Points
True (*)
False
Correct
38. _______ consistency guarantees a consistent view of the data at all times.
Mark for Review

(1) Points
Table
Write
Data
Read (*)
Correct
39. A database transaction consists of the following except :
Mark for Review

(1) Points
SELECT queries (*)
DML statements representing one consistent change to the data
One DDL Statement
One TCL Statement
Incorrect. Refer to Section 6 Lesson 5.
40. A transaction begins when the first DML statement is encountered and ends when
one of the following occurs .....
Mark for Review

(1) Points
A COMMIT or ROLLBACK statement is issued.
A DDL statement, such as CREATE, is issued.
Either of the above statements (*)
None of the above

41. Structured Query Language (SQL) is the set-based, declarative language used to
access data in an Oracle database.
Mark for Review

(1) Points
True (*)
False
Correct
42. The type of SQL Command used to define database structures is :
Mark for Review

(1) Points
DML
DCL
TCL
DDL (*)
Incorrect. Refer to Section 6 Lesson 2.
43. All of the following are stages of SQL Processing except:
Mark for Review
(1) Points
Row Source Generation
Execution
Parsing
Optimization
All of the above options are stages of SQL processing. (*)
Correct
44. Which software is used to manage reading and manipulating a relational database
?
Mark for Review

(1) Points
Spreadsheet software
Flat file software
ERD software
DBMS software (*)
Correct
45. You can specify multiple columns after the DISTINCT qualifier.
Mark for Review

(1) Points
True (*)
False

46. To eliminate duplicate rows in the result, include the _________ keyword in the
SELECT clause.
Mark for Review

(1) Points
DISTINCT (*)
DESCRIBE
IF
WHERE
Incorrect. Refer to Section 6 Lesson 6.
47. A literal can be all of the following except :
Mark for Review

(1) Points
a calculation (*)
a date
a character
a number
Correct
48. The DESCRIBE command describes the results of a query.
Mark for Review

(1) Points
True
False (*)
Correct
49. Which column alias will cause an error?
Mark for Review

(1) Points
SELECT last_name AS lname FROM employees;
SELECT last_name AS Last Name FROM employees; (*)
SELECT last_name lname FROM employees;
SELECT last_name "Last Name" FROM employees;
Incorrect. Refer to Section 6 Lesson 6.
50. Which statement displays the last name, salary, and annual compensation of
employees where the annual compensation is calculated by multiplying the monthly
salary with 15, plus a one-time bonus of $200.
Mark for Review

(1) Points
SELECT last_name, salary, 15*salary+200 FROM employees; (*)
SELECT last_name, salary, 15*(salary+200) FROM employees;
Either statement will produced the desired result.
Neither statement will produce the desired result.

6. A ______________ in Oracle SQL Developer Data Modeler is a set of accepted terms


that can be used in the design.
Mark for Review

(1) Points
table
validation rule
glossary (*)
template
Correct
7. Constraints should be given meaningful names to make them easier to reference.
Mark for Review

(1) Points
True (*)
False
Correct
8. Foreign key constraints are named using the ______________ of both tables.
Mark for Review

(1) Points
full table name
UID suffix
foreign key name
short table name (*)
Correct
Section 6
(Answer all questions in this section)
9. Which of the following is the wildcard used for any number of characters in SQL?
Mark for Review

(1) Points
% (*)
#
&
||
Correct
10. You use the ______ operator to perform wildcard searches of valid search string
values.
Mark for Review

(1) Points
MATCH
BETWEEN
STRING
LIKE (*)
11. According to the rules of precedence which operator will be evaluated first?
Mark for Review

(1) Points
AND (*)
OR
Both are on the same level of precedence.
Correct
12. You can override the default order by using parentheses around the expressions
that you want to calculate first.
Mark for Review

(1) Points
True (*)
False
Incorrect. Refer to Section 6 Lesson 7.
13. The ______ operator requires either of the component conditions to be true.
Mark for Review

(1) Points
BETWEEN
OR (*)
EITHER
AND
Correct
14. Users may view data that is in the process of being changed by another user.
Mark for Review

(1) Points
True
False (*)
Correct
15. A database transaction consists of the following except :
Mark for Review

(1) Points
One TCL Statement
DML statements representing one consistent change to the data
SELECT queries (*)
One DDL Statement

16. An automatic commit occurs when _________ . (Choose 2)


Mark for Review

(1) Points
A DDL statement is executed.
(*)
A TCL statement is executed.
(*)
A DML statement is executed.

SELECT statement is executed.

Incorrect. Refer to Section 6 Lesson 5.


17. With the __________ and ROLLBACK statements, you have control over making
changes to the data permanent
Mark for Review

(1) Points
WHERE
DELETE
COMMIT (*)
INSERT
Correct
18. The DESCRIBE command describes the results of a query.
Mark for Review

(1) Points
True
False (*)
Correct
19. You can specify multiple columns after the DISTINCT qualifier.
Mark for Review

(1) Points
True (*)
False
Correct
20. Null is the same as zero or a blank space. True or False?
Mark for Review

(1) Points
True
False (*)

21. You can link columns to other columns, arithmetic expressions, or constant
values to create a character expression by using the ____________ operator (||).
Mark for Review

(1) Points
addition
alias
concatenation (*)
literal
Correct
22. Arithmetic expressions containing a null value evaluate to _________.
Mark for Review

(1) Points
zero
whatever the calculation evaluates to
null (*)
will cause an error
Incorrect. Refer to Section 6 Lesson 6.
23. You can display selected columns of a table by listing them in the __________
clause.
Mark for Review

(1) Points
IF
SELECT (*)
FROM
WHERE
Correct
24. Table names and column names must begin with a number and should be 1–30
characters long.
Mark for Review
(1) Points
True
False (*)
Correct
25. ___________ constraints can only be created at the column level.
Mark for Review

(1) Points
Not Null (*)
Primary Key
Check
Unique

26. Constraints cannot be added to a table after its creation.


Mark for Review

(1) Points
True
False (*)
Correct
27. If a table already contains rows when a column is added, the new column is
initially null or takes the default value for all the rows. True or False?
Mark for Review

(1) Points
True (*)
False
Correct
28. When you define a table, you can specify that a column should be given a
default value by using the LITERAL option.
Mark for Review

(1) Points
True
False (*)
Incorrect. Refer to Section 6 Lesson 3.
29. The type of SQL Command used to modify data is :
Mark for Review

(1) Points
DDL
TCL
DML (*)
DCL
Correct
30. Functions of SQL are:
Mark for Review

(1) Points
Inserting, updating, and deleting rows in a table
Querying data stored in the database
Both of the above options are functions of SQL (*)
Neither of the above options are functions of SQL

31. Relational Databases store data in a two-dimensional matrix known as a


_________.
Mark for Review

(1) Points
flat file
entity
database
table (*)
Incorrect. Refer to Section 6 Lesson 2.
32. You can logically relate data from multiple tables using ___________.
Mark for Review

(1) Points
data values
unique keys
check constraints
foreign keys (*)
Incorrect. Refer to Section 6 Lesson 2.
33. Data Manipulation Language includes all of the following except :
Mark for Review

(1) Points
DELETE
COMMIT (*)
UPDATE
INSERT
Correct
34. ___________________ is used to add, modify and delete data.
Mark for Review

(1) Points
Data Definition Language
Data Control Language
Data Manipulation Language (*)
Data Management Language
Correct
35. It is not mandatory to specify the column list in the INSERT statement. True or
False?
Mark for Review

(1) Points
True (*)
False

36. The TRUNCATE statement is a data definition language (DDL) statement and
generates no rollback information.
Mark for Review

(1) Points
True (*)
False
Correct
37. The command that always removes all rows from a table, leaving the table empty
and the table structure intact is ...
Mark for Review

(1) Points
TRUNCATE (*)
DELETE
Both
None
Incorrect. Refer to Section 6 Lesson 4.
38. What type of join is the following statement?
SELECT e.EMPLOYEE_ID, e.LAST_NAME, d.DEPARTMENT_ID, d.DEPARTMENT_NAME,
d.LOCATION_ID
FROM EMPLOYEES e, DEPARTMENTS d;
Mark for Review

(1) Points
NATURAL JOIN
OUTER JOIN
INNER JOIN
CROSS JOIN (*)
Correct
39. The ________ join clause is based on all the columns in the two tables that
have the same name and the same datatype.
Mark for Review

(1) Points
CROSS JOIN
NATURAL JOIN (*)
OUTER JOIN
USING
Correct
40. The ___________ JOIN clause produces the cross-product of two tables.
Mark for Review

(1) Points
CROSS (*)
INNER
CARTESIAN
OUTER

41. Why will the following statement result in an error?


SELECT l.city, d.department_name
FROM locations l JOIN departments d
USING (location_id)
WHERE d.location_id = 1400;
Mark for Review

(1) Points
Syntax of the USING clause is incorrect.
The field in the USING clause cannot have a qualifier. (*)
WHERE clause cannot be used in a query with USING.
There is nothing wrong - this will run correctly.
Correct
42. Will the following statement execute successfully (True or False)?
SELECT e.employee_id, e.last_name, e.department_id, d.department_id, d.location_id
FROM employees e JOIN departments d
ON (e.department_id = d.department_id);
Mark for Review

(1) Points
True (*)
False
Correct
43. Which of the following statements is an example of a SELF JOIN?
Mark for Review

(1) Points
SELECT department_id, department_name,location_id, city
FROM departments NATURAL JOIN locations;
SELECT e.employee_id, e.last_name, e.department_id, d.department_id, d.location_id
FROM employees e JOIN departments d
ON (e.department_id = d.department_id)
AND e.manager_id = 149 ;
SELECT e.employee_id, e.last_name, e.department_id, d.department_id, d.location_id
FROM employees e JOIN departments d
ON (e.department_id = d.department_id);
SELECT worker.last_name emp, manager.last_name mgr
FROM employees worker JOIN employees manager
ON (worker.manager_id = manager.employee_id); (*)
Correct
44. The _________ clause in a query comes immediately after the SELECT and FROM.
Mark for Review

(1) Points
GROUP BY
WHERE (*)
ORDER BY
IF
Correct
45. Application programs enable us to ________.
Mark for Review

(1) Points
Check email.
Create documents
Edit photogrphs
All of the above. (*)

46. Oracle Application Express is an application platform used to share and learn
_____ and __________.
Mark for Review

(1) Points
SQL, Java
Java, PL/SQL
SQL, Java Script
SQL, PL/SQL (*)
Correct
47. Which statements will execute successfully?
(Choose 2)
Mark for Review

(1) Points
SELECT employee_id, first_name, last_name
FROM employees
ORDER BY employee_id DESCEND;

SELECT first_name, last_name


FROM employees
ORDER BY employee_id DES;

SELECT first_name, last_name, first_name||last_name fullname


FROM employees
ORDER BY fullname;
(*)
SELECT employee_id, last_name, job_id, department_id, hire_date
FROM employees
ORDER BY 3;
(*)
Correct
48. Which is the correct order of execution for statements in a SELECT query ?
Mark for Review

(1) Points
SELECT, ORDER BY,FROM, WHERE,
FROM, SELECT, ORDER BY,WHERE
SELECT, WHERE, FROM, ORDER BY
FROM, WHERE, SELECT, ORDER BY (*)
Incorrect. Refer to Section 6 Lesson 8.
49. Which SQL key word is used to do ranking in top-n-analysis
Mark for Review

(1) Points
GROUP BY
ROWNUM (*)
WHERE
ORDER BY
Correct
50. Which character is used as a substitution variable in APEX?
Mark for Review

(1) Points
;
*
&
: (*)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy