WorksheetsDBMS-QUIZ
Total questions: 11
Worksheet time: 5mins
In a DBMS, which command is used to set a point in the transaction to which you can roll back later?
COMMIT
ROLLBACK
SAVEPOINT
SET TRANSACTION
Which of the following is true about the COMMIT command in DBMS?
It sets the isolation level of the current transaction.
It permanently saves the changes made in the current transaction.
It allows you to undo all changes made in the transaction.
It creates a savepoint that can be used for rollback.
What is the main advantage of using PL/SQL in Oracle DBMS?
It allows procedural logic, which makes SQL queries more efficient.
It is used only for basic data retrieval.
It provides support for object-oriented programming.
It enables execution of SQL queries only in the client-side application.
Which of the following is NOT a valid component of a PL/SQL block?
Declaration
Execution
Commit
Exception Handling
Which of the following is the primary purpose of using triggers in a database?
To optimize query performance by automatically indexing tables whenever data is modified.
To automatically maintain data integrity by synchronizing changes between related tables.
To adjust table structures dynamically when data modifications occur.
To enforce business rules by triggering automatic actions in response to data changes.
What is the problem with this trigger?
The trigger will not work because :NEW.emp_name is not valid in a BEFORE INSERT trigger.
The trigger is valid and will work as intended.
RAISE_APPLICATION_ERROR can only be used in a BEFORE UPDATE trigger.
The trigger will only work if the column emp_name is explicitly defined as NOT NULL.
Which of the following is true for the following trigger?
The trigger is valid and will execute after every update on the salary field.
The trigger will fail because :NEW.salary cannot be used in an AFTER UPDATE trigger.
The trigger will only execute if the salary value is greater than 100000.
The trigger will cause an error if the salary value is less than 100000.
Which of the following defines a strict schedule?
A schedule where a transaction commits before accessing any shared data item.
A schedule in which all conflicting transactions are executed serially.
A schedule where all transactions must be committed before any other transaction can access data.
A schedule in which no transaction can read or write any data item that another uncommitted transaction is accessing.
A schedule is __________ if it is conflict equivalent to a serial schedule.
Conflict serializable
Conflicting
Conflict serial schedule
None of these
State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter.
(a)
Only S1 is conflict serializable
Only S2 is conflict serializable
Both S1 and S2 are conflict serializable
Both S1 and S2 are not conflict serializable
