Вы находитесь на странице: 1из 30

Question 1

Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct example of creating a subquery that copy the values
from employees table to workers table?

Select one:
a. INSERT INTO WORKERS(ID, NAME, POSITION)
SELECT (ID, NAME, JOB_TITLE
FROM EMPLOYEES);
b. INSERT INTO WORKERS(ID, NAME, POSITION)
SELECT (ID, NAME, POSITION
FROM EMPLOYEES);
c. INSERT INTO WORKERS(ID, NAME, POSITION)
VALUES (ID, NAME, POSITION
FROM EMPLOYEES);
d. INSERT INTO WORKERS(ID, NAME, POSITION)
FROM EMPLOYEES;
Clear my choice

Question 2
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT employees.employee_id, employees.lastname,employees.department_id,


departments.department_id,departments.location_id
FROM employees JOIN departments
USING (department_id);

Select one:
a. The given statement is Outer Join
b. The given statement is not a valid join condition or is incorrect
c. The given statement would cause Cartesian or Cross Join
d. The given statement is an Equijoin
Clear my choice

Question 3
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct example of an attributes.

Select one:
a. SN_ID
b. Student
c. Teacher
d. Department
Clear my choice

Question 4
Answer saved
Marked out of 1.00

Flag question

Question text
If WITH READ ONLY is added on the view (see sample code below) what is/are the
restriction?
CREATE OR REPLACE VIEW STUD_VIEW (USN_ID, LASTNAME, FIRSTNAME,
COURSE)
AS (SELECT USN_ID, LASTNAME, FIRSTNAME, COURSE
FROM STUDENTS
WHERE COURSE = ‘BSCS’)
WITH READ ONLY;

Select one:
a. It restricts the users to add a value where course is equal to BSCS only
b. SELECT statement is not allowed on this view
c. NO DML operations allowed on this view.
d. It restricts the users to add a value where course is not equal to BSCS
Clear my choice

Question 5
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT employees.employee_id, employees.lastname,employees.department_id,


departments.department_id,departments.location_id
FROM employees LEFT JOIN departments
ON( employees.department_id = departments.department_id);

Select one:
a. The given statement is not a valid join condition or is incorrect
b. The given statement is Outer Join
c. The given statement is an Equijoin
d. The given statement would cause Cartesian or Cross Join
Clear my choice

Question 6
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following joins are mutually exclusive.

Select one:
a. Inner join and Outer Join
b. Natural Join and Using clause
c. Left and Right Outer join
d. IN and Using clause
Clear my choice

Question 7
Answer saved
Marked out of 1.00

Flag question

Question text

This is a type of schema that has the power to change the physical data without impacting
the schema or logical data.

Select one:
a. Logical Database Schema
b. Physical Data Independence
c. Logical Data Independence
d. Physical Database Schema
Clear my choice

Question 8
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT EMPLOYEES.EMPLOYEE_ID,
EMPLOYEES.LASTNAME,EMPLOYEES.DEPARTMENT_ID,DEPARTMENTS.DEPARTME
NT_ID,DEPARTMENTS.LOCATION_ID
FROM EMPLOYEES RIGHT OUTER JOIN DEPARTMENTS
ON( EMPLOYEES.DEPARTMENT_ID = DEPARTMENTS.DEPARTMENT_ID);

Select one:
a. The given statement is an Equijoin
b. The given statement is Outer Join
c. The given statement is not a valid join condition or is incorrect
d. The given statement would case Cartesian or Cross Join
Clear my choice

Question 9
Answer saved
Marked out of 1.00

Flag question

Question text

A type of model that is based on the notion of real-world entities and relationships among
them.

Select one:
a. Entity Relationship Diagram
b. Data Model
c. Entity Relationship Model
d. Database Schema
Clear my choice

Question 10
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT employees.employee_id, employees.lastname,employees.department_id,


departments.department_id,departments.location_id FROM employees JOIN departments
WHERE employees.department_id = departments.department_id;

Select one:
a. The given statement is Outer Join
b. The given statement would cause Cartesian or Cross Join
c. The given statement is an Equijoin
d. The given statement is not a valid join condition or is incorrect
Clear my choice

Question 11
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT emp.employee_id, employees.lastname,emp.department_id,


dept.department_id,dept.location_id
FROM employees emp, departments dept
WHERE emp.department_id = dept.department_id;
Select one:
a. The given statement is an Equijoin
b. The given statement would cause Cartesian or Cross Join
c. The given statement is not a valid join condition or is incorrect
d. The given statement is Outer Join
Clear my choice

Question 12
Answer saved
Marked out of 1.00

Flag question

Question text

It is a join of two or more table that returns only matched rows.

Select one:
a. Inner Join
b. Using
c. ON
d. Outer Join
Clear my choice

Question 13
Answer saved
Marked out of 1.00

Flag question

Question text

Refer to the table AUTHORS and COPY_AUTHORS (Note ID column is with Primary Key
constraint). Supposed that the user insert the following values to COPY_AUTHORS view as
shown below what is/are the possible output on both table and view?
INSERT INTO COPY_AUTHORS VALUES (6,'SUSAN CARLOS','OS','2016');

Select one:
a. Automatically set the ID of Susan to NULL
b. 0 rows are added on COPY_AUTHORS view but 1 row is added on AUTHORS table.
c. Unique constraint is violated on AUTHORS table
d. 1 row is added on COPY_AUTHORS view but 0 rows are added on AUTHORS table.
Clear my choice

Question 14
Answer saved
Marked out of 1.00

Flag question

Question text

This is used to quality ambiguous column when joining two or more tables.

Select one:
a. Table Prefixes
b. Column Alias
c. Table Alias
d. Column Prefixes
Clear my choice

Question 15
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct query that will create a report that will display the
following: FIRTSNAME, SALARY with additional 1000 in employees salary, rename this
column as BONUS, then get the DEPARTMENT_NAME and DEPARTMENT_ID. Join the
table using ON condition.

Select one:
a. SELECT FIRSTNAME, SALARY + 1000 AS BONUS, DEPARTMENT_NAME,
DEPARTMENT_ID
FROM EMPLOYEES E JOIN DEPARTMENTS D
ON E.DEPARTMENT_ID = D.DEPARTMENT_ID;
b. SELECT FIRSTNAME, SALARY + 1000 AS BONUS, DEPARTMENT_NAME,
D.DEPARTMENT_ID
FROM EMPLOYEES E JOIN DEPARTMENTS D
ON DEPARTMENT_ID = DEPARTMENT_ID;
c. SELECT FIRSTNAME, SALARY + 1000 AS BONUS, DEPARTMENT_NAME,
D.DEPARTMENT_ID
FROM EMPLOYEES E JOIN DEPARTMENTS D
ON E.DEPARTMENT_ID = D.DEPARTMENT_ID;
d. SELECT FIRSTNAME, SALARY + 1000 AS BONUS, DEPARTMENT_NAME,
D.DEPARTMENT_ID
FROM EMPLOYEES JOIN DEPARTMENTS
ON E.DEPARTMENT_ID = D.DEPARTMENT_ID;
Clear my choice

Question 16
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT employees.employee_id, employees.lastname,employees.department_id,


departments.department_id,departments.location_id
FROM employees RIGHT OUTER JOIN departments
ON( employees.department_id = departments.department_id);

Select one:
a. The given statement is not a valid join condition or is incorrect
b. The given statement would cause Cartesian or Cross Join
c. The given statement is an Equijoin
d. The given statement is Outer Join
Clear my choice

Question 17
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct example of multiple row subquery?

Select one:
a. SELECT EMPLOYEE_ID, MIN(SALARY)
FROM EMPLOYEES
WHERE SALARY =(SELECT MIN(SALARY) FROM EMPLOYEES;
b. SELECT EMPLOYEE_ID, MIN(SALARY)
FROM EMPLOYEES;
c. SELECT EMPLOYEE_ID, SALARY
FROM EMPLOYEES
WHERE SALARY =(SELECT MIN(SALARY) FROM EMPLOYEES;
d. SELECT EMPLOYEE_ID, SALARY
FROM EMPLOYEES
HAVING MIN(SALARY);
Clear my choice

Question 18
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is not part of single to subqueries?

Select one:
a. =
b. IN
c. >=
d. <>
Clear my choice

Question 19
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following are the two types of subquery. 

Select one:
a. One and many row subquery
b. Many row and single subquery
c. Multiple row and one row subquery
d. Single row and multiple row subquery
Clear my choice

Question 20
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT employees.employee_id, employees.lastname,employees.department_id,


departments.department_id,departments.location_id
FROM employees FULL OUTER JOIN departments
ON (WHERE employees.department_id = departments.department_id);

Select one:
a. The given statement is not a valid join condition or is incorrect
b. The given statement is an Equijoin
c. The given statement would cause Cartesian or Cross Join
d. The given statement is Outer Join
Clear my choice

Question 21
Answer saved
Marked out of 1.00

Flag question

Question text

Supposed that table: Workers and Employees is consists of the following values.
What will be the output if the user uses this PL/SQL.
DELETE FROM WORKERS
WHERE LASTNAME = (SELECT LASTNAME FROM EMPLOYEES WHERE
LASTNAME=Cruz’)

Select one:
a. 0 rows are deleted in Workers table
b. Employee in Workers table with lastname equal to Cruz will be deleted.
c. Employee in Employees table with lastname equal to Cruz will be deleted.
d. 0 rows are deleted in Employees table
Clear my choice

Question 22
Answer saved
Marked out of 1.00

Flag question

Question text

This is a join clause used when the columns in two or more tables have the same but of
different data type.

Select one:
a. Outer Join
b. ON
c. Inner Join
d. Using
Clear my choice

Question 23
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following joins are mutually exclusive.

Select one:
a. IN and Using clause
b. Left and Right Outer join
c. Inner join and Outer Join
d. Natural Join and Using clause
Clear my choice
Question 24
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT employees.employee_id, employees.lastname,employees.department_id,


departments.department_id,departments.location_id
FROM employees, departments
WHERE employees.department_id IN (50, 60, 90);

Select one:
a. The given statement is an Equijoin
b. The given statement is Outer Join
c. The given statement would cause Cartesian or Cross Join
d. The given statement is not a valid join condition or is incorrect
Clear my choice

Question 25
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct example of creating a view where LASTNAME ends
with letter S rename LASTNAME to SURNAME?

Select one:
a. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME
FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE '%S');
b. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME
FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE 'S%');
c. CREATE VIEW WORKERS (EMPLOYEE_ID, LASTNAME, FIRSTNAME)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME
FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE '%S');
d. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME)
AS (EMPLOYEE_ID, LASTNAME AS "SURNAME", FIRSTNAME
FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE '%S');
Clear my choice

Question 26
Answer saved
Marked out of 1.00

Flag question

Question text

It is the skeleton structure that represents the logical view of the entire database.

Select one:
a. Entity Relationship Model
b. Database Schema
c. Entity Relationship Diagram
d. Data Model
Clear my choice

Question 27
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is not true about complex view when using UPDATE statement?
Select one:
a. You cannot modify data in a view if it contains a GROUP BY clause
b. You cannot modify data in a view if it contains group functions
c. You cannot modify data in a view if it contains column defined expression
d. All of the choices
Clear my choice

Question 28
Answer saved
Marked out of 1.00

Flag question

Question text

It is formed when a join condition is omitted.

Select one:
a. Cross Join
b. Natural Join
c. Self-Join
d. Cartesian Product
Clear my choice

Question 29
Answer saved
Marked out of 1.00

Flag question

Question text

This is a type of attribute that is atomic value, which cannot be divided further.

Select one:
a. Derived Attribute
b. Natural Attribute
c. Composite Attribute
d. Simple Attribute
Clear my choice

Question 30
Answer saved
Marked out of 1.00

Flag question

Question text

If WITH CHECK OPTION is added on the view (see sample code below) what is/are the
restriction?
CREATE OR REPLACE VIEW VIEW STUD_VIEW (USN_ID, LASTNAME, FIRSTNAME,
COURSE)
AS (SELECT USN_ID, LASTNAME, FIRSTNAME, COURSE
FROM STUDENTS
WHERE COURSE = ‘BSCS’
WITH CHECK OPTION CONSTRAINT STUD_VIEW_CK;

Select one:
a. SELECT statement is not allowed on this view
b. It restricts the users to add a value where course is not equal to BSCS
c. NO DML operations allowed on this view.
d. It restricts the users to add a value where course is equal to BSCS only
Clear my choice
Question 31
Answer saved
Marked out of 1.00

Flag question

Question text

It is join between two tables that return the result of an Inner Join as well as the results of
Left and Right joins.

Select one:
a. Using
b. ON
c. Inner Join
d. Outer Join
Clear my choice

Question 32
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is not true rule to follow in writing PL/SQL that contains subquery?

Select one:
a. The subquery can appear on either side of the comparison operator.
b. Use single-row operators with single-row subqueries and multiple-row operators with
multiple-row subqueries.
c. Enclose subqueries in double bracket symbol.
d. Place subqueries on the right side of the comparison condition for readability.
Clear my choice

Question 33
Answer saved
Marked out of 1.00

Flag question

Question text

This is the fundamental entity which introduces abstraction in a Database Management


System (DBMS).

Select one:
a. Entity Relationship Model
b. Database Schema
c. Entity Relationship Diagram
d. Data Model
Clear my choice

Question 34
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT EMPLOYEES.EMPLOYEE_ID,
EMPLOYEES.LASTNAME,EMPLOYEES.DEPARTMENT_ID,DEPARTMENTS.DEPARTME
NT_ID,DEPARTMENTS.LOCATION_ID
FROM EMPLOYEES JOIN DEPARTMENTS
ON( EMPLOYEES.DEPARTMENT_ID (+)= DEPARTMENTS.DEPARTMENT_ID);

Select one:
a. The given statement is Outer Join
b. The given statement is an Equijoin
c. The given statement would case Cartesian or Cross Join
d. he given statement is not a valid join condition or is incorrect
Clear my choice

Question 35
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct example of modifying a view where salary manager_id
is null?

Select one:
a. CREATE OR REPLACE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME,
MANAGER_ID)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME, MANAGER_ID
FROM EMPLOYEES
WHERE MANAGER_ID = NULL);
b. CREATE OR REPLACE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME,
MANAGER_ID)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME, MANAGER_ID)
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL);
c. CREATE OR REPLACE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME,
MANAGER_ID)
AS (EMPLOYEE_ID, LASTNAME AS "SURNAME", FIRSTNAME, MANAGER_ID
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL);
d. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME, MANAGER_ID)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME, MANAGER_ID
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL);
Clear my choice

Question 36
Answer saved
Marked out of 1.00
Flag question

Question text

This is a type of attribute that is made of more than one simple attribute.

Select one:
a. Composite Attribute
b. Derived Attribute
c. Natural Attribute
d. Simple Attribute
Clear my choice

Question 37
Answer saved
Marked out of 1.00

Flag question

Question text

A join condition that is based on all the columns in two or more table that have the same
name.

Select one:
a. Natural Join
b. Cartesian Product
c. Cross Join
d. Self-Join
Clear my choice

Question 38
Answer saved
Marked out of 1.00
Flag question

Question text

Which of the following is the correct query that will create a report that will display the
following: STREET_ADDRESS, CITY, DEPARTMENT_NAME and LOATION_ID? Use
using clause to get the data from two tables.

Select one:
a. SELECT STREET_ADDRESS, CITY, DEPARTMENT_NAME, LOCATION_ID
FROM DEPARTMENTS
JOIN LOCATIONS
NATURAL JOIN (LOCATION_ID);
b. SELECT STREET_ADDRESS, CITY, DEPARTMENT_NAME, LOCATION_ID
FROM DEPARTMENTS
JOIN LOCATIONS
USING (LOCATION_ID);
c. SELECT STREET_ADDRESS, CITY, DEPARTMENT_NAME, LOCATION_ID
FROM DEPARTMENTS
JOIN LOCATIONS
WHERE USING (LOCATION_ID);
d. SELECT STREET_ADDRESS, CITY, DEPARTMENT_NAME, LOCATION_ID
FROM DEPARTMENTS
JOIN LOCATIONS
USING (LOCATIONS);
Clear my choice

Question 39
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is not true about complex view when using DELETE statement?

Select one:
a. You cannot modify data in a view if it contains a distinct keyword.
b. You cannot modify data in a view if it contains a GROUP BY clause
c. You cannot modify data in a view if it contains group functions
d. All of the choices
Clear my choice

Question 40
Answer saved
Marked out of 1.00

Flag question

Question text
Based on the table EMPLOYEES, DEPARTMENTS and LOCATIONS.
From the given select statement below: What is/are the full name of employee whose
LOCATION_ID is equal to 1700?
SELECT (LASTNAME||','||FIRSTNAME) AS "FULL NAME", DEPARTMENT_ID,
DEPARTMENT_NAME, LOCATION_ID
FROM EMPLOYEES
NATURAL JOIN DEPARTMENTS;
 

Select one:
a. FAY, PAT and DAVIES, CURTIS
b. KOCHAR, NENA and LEX, DE HAAN
c. GIETZ, WILLIAM
d. LORENTZ, DIANA
Clear my choice

Question 41
Answer saved
Marked out of 1.00

Flag question

Question text

A join condition used when a table has columns with match values.

Select one:
a. Cross Join
b. Self-Join
c. Natural Join
d. Cartesian Product
Clear my choice

Question 42
Answer saved
Marked out of 1.00

Flag question

Question text

In the given complex view example what will be the possible output if this code is run?
CREATE OR REPLACE VIEW DEPT_EMP
AS (SELECT EMPLOYEE_ID, LASTNAME, DEPARTMENT_NAME
FROM EMPLOYEES JOIN DEPARTMENT)

Select one:
a. It will successfully create the view that join 1 table to another table.
b. Cause an error because the JOIN condition is omitted.
c. Missing with CHECK OPTION
d. The OR REPLACE on the code should be omitted.
Clear my choice

Question 43
Answer saved
Marked out of 1.00
Flag question

Question text

Which of the following is not true about complex view when using INSERT statement?

Select one:
a. You cannot modify data in a view if it contains a GROUP BY clause
b. You cannot add data through a view if the view includes the pseudocolumn ROWNUM
keyword
c. All of the choices
d. You cannot add data through a view if the view includes:Group functions
Clear my choice

Question 44
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is not true application of subquery in DML statements?

Select one:
a. Merge one table to another table.
b. Retrieve data from an inline view
c. Copy data from one table to another
d. Delete rows from one table based on rows in a another table
Clear my choice

Question 45
Answer saved
Marked out of 1.00
Flag question

Question text

This is a jpin clause that produces a cross-product of two or more tables.

Select one:
a. Cartesian Product
b. Natural Join
c. Cross Join
d. Self-Join
Clear my choice

Question 46
Answer saved
Marked out of 1.00

Flag question

Question text

Supposed that table: Workers and Employees is consists of the following values. What will
be the output if the user uses this PL/SQL.
SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE ID > (SELECT ID FROM EMPLOYEES WHERE STATUS = ‘Probi’);
 

Select one:
a. This will retrieve the record of Subion, Mortos and Santiago
b. No rows or 0 rows are Selected
c. 0 rows are deleted in Workers table
d. This will retrieve the record of Mortos and Santiago
Clear my choice

Question 47
Answer saved
Marked out of 1.00

Flag question

Question text

This is a join clause used when the columns in two or more tables have the same but of
different data type.

Select one:
a. Using
b. Inner Join
c. ON
d. Outer Join
Clear my choice

Question 48
Answer saved
Marked out of 1.00

Flag question
Question text

SELECT EMPLOYEES.EMPLOYEE_ID,
EMPLOYEES.LASTNAME,EMPLOYEES.DEPARTMENT_ID,DEPARTMENTS.DEPARTME
NT_ID,DEPARTMENTS.LOCATION_ID
FROM EMPLOYEES JOIN DEPARTMENTS
USING (DEPARTMENT_ID);

Select one:
a. The given statement is not a valid join condition or is incorrect
b. The given statement is an Equijoin
c. The given statement would case Cartesian or Cross Join
d. The given statement is Outer Join
Clear my choice

Question 49
Answer saved
Marked out of 1.00

Flag question

Question text

Supposed that table: Workers and Employees is consists of the following values.
What will be the output if the user uses this PL/SQL.
UPDATE EMPLOYEES
SET LASTNAME = (SELECT LASTNAME FROM WORKERS WHERE
LASTNAME=’Soriano’)
WHERE ID=105;
Select one:
a. All Workers lastname will be set to NULL
b. The lastname of Cruz from Employees table will be set to NULL
c. The lastname of Cruz from Employees table will be set to Soriano
d. The values of Employee with ID number 105 will be deleted
Clear my choice

Question 50
Answer saved
Marked out of 1.00

Flag question

Question text

This is a type of schema defines all the logical constraints that need to be applied on the
data stored. It defines tables, views, and integrity constraints.

Select one:
a. Physical Database Schema
b. Logical Data Independence
c. Logical Database Schema
d. Physical Data Independence
Clear my choice

40/50

Вам также может понравиться