Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DBMS-QUIZ

Total questions: 11

Worksheet time: 5mins

Name
Class
Date
1.

In a DBMS, which command is used to set a point in the transaction to which you can roll back later?

a)

COMMIT

b)

ROLLBACK

c)

SAVEPOINT

d)

SET TRANSACTION

2.

Which of the following is true about the COMMIT command in DBMS?

a)

It sets the isolation level of the current transaction.

b)

It permanently saves the changes made in the current transaction.

c)

It allows you to undo all changes made in the transaction.

d)

It creates a savepoint that can be used for rollback.

3.

What is the main advantage of using PL/SQL in Oracle DBMS?

a)

It allows procedural logic, which makes SQL queries more efficient.

b)

It is used only for basic data retrieval.

c)

It provides support for object-oriented programming.

d)

It enables execution of SQL queries only in the client-side application.

4.

Which of the following is NOT a valid component of a PL/SQL block?

a)
  • Declaration

b)
  • Execution

c)
  • Commit

d)
  • Exception Handling

5.

Which of the following is the primary purpose of using triggers in a database?

a)

To optimize query performance by automatically indexing tables whenever data is modified.

b)

To automatically maintain data integrity by synchronizing changes between related tables.

c)

To adjust table structures dynamically when data modifications occur.

d)

To enforce business rules by triggering automatic actions in response to data changes.

6.

What is the problem with this trigger?

a)
  • The trigger will not work because :NEW.emp_name is not valid in a BEFORE INSERT trigger.

b)
  • The trigger is valid and will work as intended.

c)
  • RAISE_APPLICATION_ERROR can only be used in a BEFORE UPDATE trigger.

d)
  • The trigger will only work if the column emp_name is explicitly defined as NOT NULL.

7.

Which of the following is true for the following trigger?

a)
  • The trigger is valid and will execute after every update on the salary field.

b)
  • The trigger will fail because :NEW.salary cannot be used in an AFTER UPDATE trigger.

c)
  • The trigger will only execute if the salary value is greater than 100000.

d)
  • The trigger will cause an error if the salary value is less than 100000.

8.

Which of the following defines a strict schedule?

a)

A schedule where a transaction commits before accessing any shared data item.

b)

A schedule in which all conflicting transactions are executed serially.

c)

A schedule where all transactions must be committed before any other transaction can access data.

d)

A schedule in which no transaction can read or write any data item that another uncommitted transaction is accessing.

9.

A schedule is __________ if it is conflict equivalent to a serial schedule.

a)

Conflict serializable

b)

Conflicting

c)

Conflict serial schedule

d)

None of these

10.

State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter.

(a)  

11.
a)

Only S1 is conflict serializable

b)

Only S2 is conflict serializable

c)

Both S1 and S2 are conflict serializable

d)

Both S1 and S2 are not conflict serializable