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

BAED-PROG3114 Programming (Oracle

Database) NCIII Part 2


Grade 17.00 out of 20.00 (85%)

Question 1
Complete

Mark 0.00 out of 1.00

Flag question

Question text
Which of the following will erase all records in the departments table

Select one:

a.

TRUNCATE TABLE departments

b.

DELETE FROM departments

c.

TRUNCATE FROM TABLE departments

d.

DELETE * FROM departments

Question 2
Complete

Mark 0.00 out of 1.00


Flag question

Question text
These are collection of objects such as tables, views, and sequences.

Select one:

a.

Schema

b.

Class

c.

Model

d.

Container

Question 3
Complete

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following SQL command that the DBA will run to provide Matt to create a table in the
Oracle Database.

Select one:

a.

GRANT matt create table

b.
GRANT matt TO create table

c.

GRANT ACCESS matt TO create table

d.

GRANT create table TO matt

Question 4
Complete

Mark 1.00 out of 1.00

Flag question

Question text
A Database Administrator can create and remove users and tables.

Select one:

a.

The statement is incorrect. DBA can only create users and tables. Removal of users and tables will be
done by the higher authority of the database.

b.

The statement is incorrect. Only users of the database can be created by the Database Administrator.

c.

The statement is correct

d.

The information is insufficient.

Question 5
Complete

Mark 1.00 out of 1.00


Flag question

Question text
Which of the following describes the command below?

SELECT * FROM employees WHERE department = 60 FOR UPDATE


Select one:

a.

Unlock all records with department id = 60

b.

All users accessing the department id 60 can accept UPDATE command simultaneously.

c.

Locks the rows in the EMPLOYEES table with department id is 60.

d.

Creates a temporary table with department = 60

Question 6
Complete

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following is NOT a task of a Database Administrator

Select one:

a.

Backing up tables
b.

None of the choices

c.

Removing tables

d.

Removing users

e.

Creating new users

Question 7
Complete

Mark 1.00 out of 1.00

Flag question

Question text
This has the highest level of privileges for task such as creating new users, removing users and tables
and backing up tables.

Select one:

a.

Owner

b.

SQL Developer

c.

DBA

d.

Manager
Question 8
Complete

Mark 1.00 out of 1.00

Flag question

Question text
What privileges that manipulates the content of the database objects.

Select one:

a.

Connection Privileges

b.

System Privileges

c.

Object Privileges

d.

Network Privileges

Question 9
Complete

Mark 1.00 out of 1.00

Flag question

Question text
Matt wants to change his password from 1234 to abcd.
Which of the following will perform the task?

Select one:
a.

UPDATE matt WITH abcd

b.

CHANGE USER matt PASSWORD abcd

c.

ALTER USER matt IDENTIFIED abcd;

d.

User matt cannot change his password. DBA has only the rights to change the password

e.

UPDATE PASSWORD 1234 TO abcd FROM matt

Question 10
Complete

Mark 1.00 out of 1.00

Flag question

Question text
A join between two tables that returns the results of the INNER join as well as the_______________
rows from the left (or right) table is called a left (or right) OUTER join.

Select one:

a.

Intersect

b.

Matched

c.

Missing
d.

Unmatched

Question 11
Complete

Mark 0.00 out of 1.00

Flag question

Question text
Angelica is the Oracle Database Administrator. She was been assigned to create an access for the newly
hired employee named Matt to the Oracle Database.

Which of the following SQL command Angelica will execute?


Select one:

a.

None of the choices

b.

CREATE matt ACCESS 1234

c.

CREATE USER matt IDENTIFIED BY 1234

d.

CREATE USERNAME matt PASSWORD 1234

e.

CREATE USER FR0M DB_USER SET user

Question 12
Complete

Mark 1.00 out of 1.00


Flag question

Question text
Evaluate the given SQL syntax
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...)
WHERE condition;

Select one:

a.

INSERT should be UPDATE command

b.

This will produce an error.

c.

Correct syntax.

d.

Wrong placement of WHERE and VALUES

Question 13
Complete

Mark 1.00 out of 1.00

Flag question

Question text
You want to cancel the privilege of matt to add records from the employees table.

Select one:

a.

REVOKE insert ON matt FROM employees;


b.

REVOKE insert ON employees FROM matt;

c.

REVOKE employees FROM matt TO insert;

d.

REVOKE matt FROM employees TO insert;

Question 14
Complete

Mark 1.00 out of 1.00

Flag question

Question text
The DBA will create a new user name sales.

Which of the following SQL command will perform the creation?


Select one:

a.

None of the choices

b.

CREATE USER sales IDENTIFIED BY 1234

c.

CREATE sales ACCESS 1234

d.

CREATE USERNAME sales SET PASSWORD default

e.

CREATE USER FR0M DB_USER SET user=’sales’ password=NULL


Question 15
Complete

Mark 1.00 out of 1.00

Flag question

Question text
A Cartesian product is formed when:

Select one:

a.

All of the choices

b.

All rows in the first table are joined to all rows in the second table

c.

A join condition is omitted

d.

A join condition is invalid

Question 16
Complete

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following will grant a query privileges on the STUDENT table

Select one:

a.
GRANT select ON student TO matt

b.

GRANT select TO matt ON student

c.

GRANT matt PRIVILEGE select TO student

d.

GRANT matt TO select student

Question 17
Complete

Mark 1.00 out of 1.00

Flag question

Question text
Evaluate the following SQL command
SELECT employee_id, hire_date, department_name FROM employees, departments
WHERE departments.department_id = employees.department_id

Select one:

a.

The SQL command should have ALIAS for the table to produce a correct output.

b.

The SQL command will give an incorrect output.

c.

The SQL command will produce a correct output.

d.

The SQL command will produce an error.


Question 18
Complete

Mark 1.00 out of 1.00

Flag question

Question text
TRUE OR FALSE.
Multiple fields in NOT allowed in a Foreign key.

Select one:

True

False

Question 19
Complete

Mark 1.00 out of 1.00

Flag question

Question text
Nathaniel had accidentally deleted all the records in the newly updated ORACLE database using the
DELETE SQL command.
What is the best solution that he can do to restore all the deleted records in the database.

Select one:

a.

Run the ROLLBACK command

b.

Execute the UNDELETE command

c.
Restore the backup copy

d.

None of the choices

e.

Re-encode the data

Question 20
Complete

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following DOES NOT describes the state of the data after the COMMIT command

Select one:

a.

Data changes are saved in the database.

b.

Locks on the affected rows are released; those rows are available for other users to manipulate.

c.

The previous state of the data is overwritten.

d.

All users can view the results.

e.

None of the choices

f.

All savepoints are erased.


Finish review

◄ Week 006-009 Interacting with Oracle Server

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