Unit 5 - Practice Quiz

INT306 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 Which of the following is a common flow control statement used to execute a block of code conditionally based on whether a condition is true?

flow control statements Easy
A. IF...THEN...ELSE
B. DECLARE
C. FETCH
D. LOOP

2 What is the primary characteristic of a database function?

functions Easy
A. It cannot accept any parameters.
B. It must return a value.
C. It is used to automatically start a transaction.
D. It must modify data in at least one table.

3 A pre-compiled collection of SQL statements stored in the database and executed as a single unit is known as a ____.

stored procedures Easy
A. Stored Procedure
B. Cursor
C. View
D. Trigger

4 What is the main purpose of a database cursor?

cursors Easy
A. To delete an entire table at once.
B. To create a temporary copy of the database.
C. To define user permissions.
D. To process the results of a query one row at a time.

5 A special type of stored procedure that is executed automatically in response to a data modification event (like INSERT, UPDATE, or DELETE) is called a:

triggers Easy
A. Trigger
B. Function
C. Cursor
D. Schedule

6 In database programming languages like PL/SQL, what block is used to catch and handle errors that occur during the execution of code?

exception handling Easy
A. The COMMIT block
B. The DECLARE block
C. The TRIGGER block
D. The EXCEPTION block

7 What is a transaction in a database?

transaction system concepts Easy
A. A connection between a client and the server.
B. A logical unit of work composed of one or more SQL statements.
C. A backup of a single table.
D. A single SELECT statement.

8 In the ACID properties of a transaction, what does the 'A' stand for?

desirable properties of transactions Easy
A. Authentication
B. Accuracy
C. Atomicity
D. Availability

9 In concurrency control, what does a 'schedule' represent?

schedules Easy
A. A timeline for database maintenance.
B. A list of database users.
C. The order in which operations from concurrent transactions are executed.
D. A plan for adding new features to the DBMS.

10 A schedule in which transactions are executed one after another, without any interleaving of operations, is known as a ____ schedule.

serializability of schedules Easy
A. Cascading
B. Serial
C. Recoverable
D. Concurrent

11 What is the primary goal of concurrency control in a DBMS?

concurrency control Easy
A. To create more tables.
B. To manage simultaneous operations without causing data inconsistencies.
C. To perform regular backups of the database.
D. To speed up the network connection.

12 Which SQL command is used to undo all the changes made by a transaction that has not yet been saved?

recoverability Easy
A. UPDATE
B. SAVE
C. COMMIT
D. ROLLBACK

13 Which ACID property ensures that once a transaction is committed, its effects are permanent, even if the system crashes afterward?

desirable properties of transactions Easy
A. Durability
B. Isolation
C. Consistency
D. Atomicity

14 Which SQL command is used to make all the changes in a transaction permanent?

transaction system concepts Easy
A. BEGIN
B. ROLLBACK
C. COMMIT
D. SAVEPOINT

15 Which of the following is a key advantage of using stored procedures?

stored procedures Easy
A. They can only be used for SELECT queries.
B. They increase the complexity of the client application code.
C. They can reduce network traffic between clients and the server.
D. They are stored on the client machine.

16 In a SQL query, where can a user-defined function that returns a single value typically be used?

functions Easy
A. Only in a COMMIT statement
B. Only in a TRIGGER
C. In place of a column name in the SELECT list or in a WHERE clause
D. Only in the FROM clause

17 After declaring and opening a cursor, which command is used to retrieve the next row from the result set?

cursors Easy
A. NEXT
B. MOVE
C. GET
D. FETCH

18 A trigger can be configured to fire ____ or ____ a DML operation.

triggers Easy
A. ONLY, NEVER
B. START, END
C. WITH, WITHOUT
D. BEFORE, AFTER

19 The strategy of preventing other transactions from accessing a data item while a transaction is using it is known as:

concurrency control Easy
A. Indexing
B. Locking
C. Normalization
D. Partitioning

20 What is the purpose of a database log (or journal) in a transaction system?

recoverability Easy
A. To keep a record of all changes made to the database for recovery purposes.
B. To store a backup copy of all tables.
C. To record user login and logout times.
D. To list all stored procedures and functions.

21 An Audit table needs to log the old and new values of a product's price whenever the Products table is updated. The trigger should only execute its logging logic for rows where the price has actually changed. Which of the following is the most appropriate trigger implementation?

triggers Medium
A. A BEFORE INSERT trigger on Products that compares the new price to a default value.
B. An AFTER UPDATE trigger on Products that checks IF NEW.price <> OLD.price for each row.
C. A STATEMENT level trigger that cannot access NEW and OLD values.
D. An AFTER UPDATE trigger on Products that logs all updated rows, regardless of which column changed.

22 Consider the schedule S: R2(A); R1(B); W2(B); W1(A); C2; C1;. What can be concluded about its serializability?

serializability of schedules Medium
A. It is conflict-serializable and equivalent to the serial schedule T1; T2.
B. It is conflict-serializable and equivalent to the serial schedule T2; T1.
C. It is not conflict-serializable.
D. It is a serial schedule.

23 A transaction is following the Two-Phase Locking (2PL) protocol. It has acquired several shared and exclusive locks and has just issued its first UNLOCK command on a data item. What is the transaction allowed to do next according to the 2PL protocol?

concurrency control Medium
A. It can acquire new shared locks but not exclusive locks.
B. It can continue to acquire and release locks freely until it commits.
C. It can only release existing locks but cannot acquire any new locks.
D. It can acquire new exclusive locks but not shared locks.

24 A transaction transfers $100 from Account A to Account B. The operation involves two steps: debiting A, then crediting B. The system guarantees that if a power failure occurs after the debit but before the credit, the debit operation will be rolled back upon restart. Which ACID property does this guarantee primarily uphold?

desirable properties of transactions Medium
A. Atomicity
B. Isolation
C. Durability
D. Consistency

25 Which of the following scenarios is the best use case for a stored procedure over a user-defined function?

stored procedures Medium
A. Calculating a complex mathematical value based on input parameters to be used in the WHERE clause of a SELECT statement.
B. Encapsulating a multi-step business process involving several INSERT, UPDATE, and DELETE statements that modifies the state of the database.
C. Returning a single, computed value (e.g., an employee's total sales) to be included as a column in a SELECT query.
D. Formatting a date value into a specific string format for display in a query result set.

26 A developer writes a procedure using a cursor to iterate through all employees in a department and give a 10% raise to those with a salary below $50,000. What is the primary reason for using a cursor in this scenario?

cursors Medium
A. To guarantee that the query will be executed faster than a set-based UPDATE.
B. To store the entire result set of the SELECT query in memory before processing.
C. To execute a single UPDATE statement that affects multiple rows more efficiently.
D. To process the result set on a row-by-row basis, allowing for conditional logic for each employee.

27 Consider the schedule S: W1(A); R2(A); W1(B); C1; R2(C); C2;. Which property best describes this schedule?

recoverability Medium
A. It is a strict schedule.
B. It is not recoverable.
C. It is recoverable, but not cascadeless.
D. It is cascadeless.

28 Analyze the following pseudo-code block:
sql
DECLARE v_count INT := 0;
BEGIN
SELECT COUNT(*) INTO v_count FROM employees WHERE department_id = 999; -- Assume dept 999 does not exist
v_count := v_count + 1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_count := -1;
WHEN OTHERS THEN
v_count := -99;
END;
-- What is the final value of v_count?

exception handling Medium
A. 1
B. -1
C. 0
D. -99

29 A database system runs two transactions concurrently. It ensures that the operations of one transaction are not visible to the other until the first one commits. From the perspective of the second transaction, the first transaction either has not happened at all, or it has completed fully. This behavior describes which ACID property?

desirable properties of transactions Medium
A. Atomicity
B. Isolation
C. Consistency
D. Durability

30 Examine the following SQL procedural logic:
sql
DECLARE counter INT := 1;
DECLARE result INT := 0;
WHILE counter <= 5 LOOP
IF counter MOD 2 = 0 THEN
result := result + counter;
END IF;
counter := counter + 1;
END LOOP;
-- What is the final value of 'result'?

flow control statements Medium
A. 15
B. 5
C. 9
D. 6

31 A developer needs a reusable piece of code that accepts an employee ID and returns the number of years they have been with the company. This value needs to be used directly within a SELECT statement to show employee details and their tenure. Why is a user-defined function (UDF) the most appropriate choice?

functions Medium
A. Because functions can return a single scalar value that can be used in the column list of a SELECT statement.
B. Because functions can modify tables, which is needed to calculate tenure.
C. Because functions are the only way to perform calculations in a database.
D. Because functions are pre-compiled and always faster than stored procedures.

32 In a system using a timestamp-ordering protocol for concurrency control, two transactions T1 and T2 have timestamps TS(T1) = 20 and TS(T2) = 25. Suppose T2 issues a read(Q) operation, and later T1 issues a write(Q) operation. What will be the system's response to T1's write request?

concurrency control Medium
A. Allow the write operation but roll back T2.
B. Reject the write operation and roll back T1.
C. Block T1 until T2 commits.
D. Allow the write operation to proceed normally.

33 A schedule is considered view-serializable if it is view-equivalent to some serial schedule. Which of the following conditions is NOT required for two schedules, S and S', to be view-equivalent?

serializability of schedules Medium
A. For each data item Q, if transaction Ti reads the initial value of Q in S, it must also read the initial value of Q in S'.
B. For each data item Q, if Ti reads a value of Q written by Tj in S, it must also read the value of Q written by Tj in S'.
C. For each data item Q, the transaction that performs the final write on Q must be the same in both S and S'.
D. For every data item, the order of conflicting operations (read-write, write-read, write-write) must be the same in both S and S'.

34 In a transaction processing system, what is the primary role of the 'log buffer'?

transaction system concepts Medium
A. To temporarily store log records in main memory before they are written to stable storage.
B. To hold the 'before' images of data for rollback purposes only.
C. To permanently store all committed transaction data.
D. To cache frequently accessed data blocks from the disk to speed up queries.

35 Given the following schedule S: R1(A); R2(A); W2(B); C2; W1(B); C1;. What is the relationship between transaction T1's write to B and transaction T2's write to B?

schedules Medium
A. There is no conflict because they commit in a different order.
B. It is a 'write-write' conflict.
C. It is a 'dirty read' because T1 reads uncommitted data from T2.
D. It is a 'lost update' because T2's update is overwritten by T1.

36 A table Inventory has a quantity column. A developer needs to prevent this quantity from ever being updated to a negative value. Any attempt to do so should raise an error and fail the UPDATE statement. Which type of trigger is most suitable for this validation rule?

triggers Medium
A. An AFTER UPDATE trigger that reverts the change if NEW.quantity is negative.
B. An INSTEAD OF UPDATE trigger on the table itself.
C. A BEFORE INSERT trigger to handle initial stock values.
D. A BEFORE UPDATE trigger that checks the NEW.quantity value.

37 Which of the following properties ensures that a system will not have to deal with cascading aborts?

recoverability Medium
A. Atomic transactions
B. Serializable schedules
C. Cascadeless schedules
D. Recoverable schedules

38 In a database system, a deadlock has occurred between four transactions, T1, T2, T3, and T4. The wait-for graph is T1 -> T2 -> T3 -> T4 -> T1. To break this deadlock, the system's deadlock detection algorithm decides to abort a transaction. Which transaction would be the most likely candidate for abortion based on common heuristics?

concurrency control Medium
A. The transaction that is at the beginning of the cycle (T1).
B. A transaction chosen completely at random from the cycle.
C. The transaction that holds the most exclusive locks.
D. The transaction that has performed the least amount of work or is the 'youngest'.

39 What is a primary advantage of using stored procedures in a client-server database application regarding network traffic?

stored procedures Medium
A. They increase network traffic because the procedure's source code is sent to the server for every execution.
B. They reduce network traffic by allowing the client to send a single call to execute multiple SQL statements on the server.
C. They have no impact on network traffic compared to executing individual SQL statements.
D. They encrypt all data sent over the network, which is their primary purpose.

40 A developer needs to write a query that categorizes employees into 'Junior', 'Mid-level', and 'Senior' based on their years_of_service. Which SQL construct is most suitable for implementing this conditional logic directly within a SELECT statement?

flow control statements Medium
A. A CASE statement
B. An IF-THEN-ELSE block
C. A WHILE loop
D. A GOTO statement

41 Consider a table Employees with an AFTER UPDATE trigger that logs changes to an AuditLog table. Another table Departments has an AFTER UPDATE trigger that, when a department's budget is changed, updates the max_salary for all employees in that department via a stored procedure. What is the most likely outcome if a transaction updates a department's budget, causing the second trigger to fire and update multiple rows in Employees, which in turn fires the first trigger for each updated employee?

triggers Hard
A. The transaction will likely succeed, with the Employees trigger firing for each row updated by the Departments trigger, creating multiple audit entries as expected.
B. The system will enter a deadlock state as the triggers on Employees and Departments attempt to acquire locks on each other's tables in a conflicting order.
C. The transaction will succeed, but the audit log will be inconsistent because triggers cannot see changes made by other triggers within the same statement.
D. The transaction will fail due to a "mutating table" error because the triggers create a circular dependency.

42 Consider the schedule S: . Which of the following statements accurately describes schedule S?

serializability of schedules Hard
A. S is conflict serializable but not view serializable.
B. S is both conflict and view serializable.
C. S is view serializable but not conflict serializable.
D. S is neither conflict serializable nor view serializable.

43 A database system uses Multi-Version Concurrency Control (MVCC) and implements the REPEATABLE READ isolation level. A long-running transaction starts and reads a set of rows from the Products table where category = 'Electronics'. While is still running, another transaction commits after inserting a new row into Products with category = 'Electronics'. Afterwards, re-executes the exact same SELECT query. What will observe?

concurrency control Hard
A. The phantom row phenomenon; will see the new row inserted by .
B. will not see the new row, and no error will occur.
C. will block until no other transactions are modifying rows that could potentially match its query predicate.
D. will fail with a serialization error because its view of the data has been invalidated by 's commit.

44 Analyze the schedule S: . How would you classify this schedule based on the properties of recoverability, cascadelessness, and strictness?

recoverability Hard
A. It is a strict schedule (and therefore also cascadeless and recoverable).
B. It is recoverable, but neither cascadeless nor strict.
C. It is recoverable and cascadeless, but not strict.
D. It is cascadeless, but not recoverable.

45 A stored procedure sp_process_order is defined with EXECUTE AS CALLER (or SQL SECURITY INVOKER). An administrative user with high privileges executes a script that grants EXECUTE permission on this procedure to a low-privilege user, web_user. The procedure contains a statement to UPDATE the Invoices table. The web_user has SELECT permission on Invoices but not UPDATE. What happens when web_user executes sp_process_order?

stored procedures Hard
A. The procedure fails during compilation/resolution because the system detects that the caller, web_user, lacks the required UPDATE permission before execution begins.
B. The procedure executes successfully, as the grant of EXECUTE permission implicitly confers the necessary underlying table permissions for the duration of the procedure's execution.
C. The procedure executes successfully because permissions are checked against the procedure's owner (the administrator), not the caller.
D. The procedure fails due to a permissions error on the UPDATE statement, because the procedure runs with the permissions of the web_user.

46 You declare a KEYSET-driven cursor on a query that selects 100 employees based on their salary. After opening the cursor, but before you have fetched all 100 rows, another transaction performs two actions and commits: (1) it UPDATEs the salary of an employee who is already in your cursor's keyset, changing a non-key column, and (2) it DELETEs a different employee who was also in your cursor's keyset. What is the behavior of the cursor when you try to fetch these two affected rows?

cursors Hard
A. The updated row will reflect the new salary value, and the deleted row will simply be skipped by the cursor without any status change.
B. Both the updated and deleted rows will be visible in the cursor as they were when the cursor was opened, showing a static snapshot.
C. The entire cursor will be invalidated and raise an error upon the next FETCH operation due to the external modifications.
D. The updated row will reflect the new salary value, but an attempt to fetch the deleted row will return a status indicating the row is missing.

47 Consider a stored procedure in a PL/SQL-like language with a transaction.
sql
BEGIN -- Transaction starts
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
BEGIN
-- Inner block with exception handler
UPDATE accounts SET balance = balance + 100 WHERE id = 999; -- Fails, account 999 does not exist
EXCEPTION
WHEN NO_DATA_FOUND THEN
INSERT INTO error_log (message) VALUES ('Account not found');
END;
UPDATE products SET stock = stock - 1 WHERE id = 5;
COMMIT;

Assuming account id = 999 does not exist and the UPDATE (or a SELECT ... INTO in PL/SQL that would cause this error) fails, raising a NO_DATA_FOUND exception, what is the final state of the database after the procedure completes?

exception handling Hard
A. The entire transaction is rolled back. No changes are committed, and nothing is logged.
B. The first UPDATE on accounts is rolled back, the error is logged, and the UPDATE on products is committed.
C. The procedure execution stops after the exception is handled, so the UPDATE on products is never executed, but the first UPDATE and the log entry are committed.
D. The first UPDATE on accounts and the UPDATE on products are both committed, and the error is logged. The failed UPDATE is ignored.

48 A database uses a strict two-phase locking (Strict 2PL) protocol. Transaction acquires a shared lock on data item A, reads it, then requests an exclusive lock on data item B. Concurrently, transaction holds an exclusive lock on B, writes to it, and then requests a shared lock on A. What situation has occurred, and what is the typical resolution mechanism?

concurrency control Hard
A. Inconsistent analysis; this scenario is prevented by the ordered locking phase of the 2PL protocol.
B. Starvation; one transaction will never be granted the lock it needs due to a continuous stream of other transactions.
C. Livelock; the system will continuously abort and restart one of the transactions.
D. Deadlock; the system will resolve it by aborting one of the transactions based on a victim selection algorithm.

49 In the context of distributed databases, the CAP theorem states a system can only provide two of Consistency, Availability, and Partition Tolerance. If a banking system must guarantee that a funds transfer between two accounts, residing on different network partitions, never results in money being created or destroyed even during a network failure, which two properties of the CAP theorem is it prioritizing, and what ACID property is this most closely related to?

desirable properties of transactions Hard
A. Prioritizing Partition Tolerance and a relaxed form of Consistency; most related to Atomicity.
B. Prioritizing Consistency and Availability (CA); most related to Isolation.
C. Prioritizing Availability and Partition Tolerance (AP); most related to Durability.
D. Prioritizing Consistency and Partition Tolerance (CP); most related to Consistency and Atomicity.

50 You have a view v_employee_dept that joins Employees and Departments tables. You define an INSTEAD OF INSERT trigger on this view. The trigger's logic correctly separates the new data and inserts it into the base Employees and Departments tables. The Employees table has a NOT NULL constraint on the department_id column, which is a foreign key to Departments. What happens if a user tries to INSERT a row into the view for a new employee in a new department, and the trigger's code inserts into the Employees table before inserting into the Departments table?

triggers Hard
A. The insert into Employees is temporarily held in a pending state until the Departments insert is complete, at which point both are committed.
B. The trigger fails and the entire operation is rolled back due to a foreign key constraint violation.
C. The INSTEAD OF trigger bypasses base table constraints, so the insert succeeds, but leaves the data in an inconsistent state.
D. The insert succeeds because constraint checking is deferred until the end of the trigger's execution.

51 A user-defined function get_stock_level(product_id) queries an Inventory table to return the current stock for a product. You then create a computed column in the Products table defined as stock AS get_stock_level(product_id). Why will a database system (like SQL Server) prevent you from creating an index on this computed column, even if it is marked as PERSISTED, unless another specific option is used during the function's creation?

functions Hard
A. The function returns a numeric data type, which cannot be indexed when it is part of a computed column.
B. An index cannot be created on any computed column that references another table, regardless of how it is done.
C. The function is not schema-bound, meaning the underlying Inventory table could be altered in a way that invalidates the function's logic.
D. Functions that perform data access are considered non-deterministic by default, and indexes can only be created on deterministic outputs.

52 In a T-SQL stored procedure, you have a WHILE loop processing rows. Inside the loop, a BEGIN TRY...BEGIN CATCH block handles potential errors for a DML operation. After the TRY...CATCH block, you check @@ROWCOUNT to decide if the loop should terminate.
sql
WHILE (1=1)
BEGIN
BEGIN TRY
-- Attempt a DML operation that might fail or affect 0 rows
UPDATE Top100Customers SET processed = 1 WHERE processed = 0;
END TRY
BEGIN CATCH
-- Log error, but allow loop to continue
INSERT INTO dbo.ErrorLog (msg) VALUES (ERROR_MESSAGE());
END CATCH

-- Check if the UPDATE did anything
IF @@ROWCOUNT = 0
BREAK; -- Exit loop
END

What is the critical flaw in this loop's termination logic?

flow control statements Hard
A. The BREAK statement inside the IF is out of scope and will cause a syntax error.
B. A deadlock will occur if the ErrorLog table is frequently locked by other processes.
C. The WHILE (1=1) loop will never terminate because @@ROWCOUNT is always reset to 1 by the BEGIN TRY statement.
D. If an error occurs, @@ROWCOUNT will reflect the row count of the INSERT into ErrorLog, not the UPDATE, leading to incorrect behavior.

53 Analyze schedule S: . Which statement correctly describes the serializability of this schedule?

serializability of schedules Hard
A. The schedule is not view serializable and not conflict serializable.
B. The schedule is view serializable but not conflict serializable.
C. The schedule is conflict serializable.
D. The schedule is recoverable but not view serializable.

54 Consider the schedule S: . Transaction performs a 'blind write'. Which property does this schedule primarily violate, and what is the potential consequence?

recoverability Hard
A. It violates the cascadeless property, leading to a potential for cascading aborts.
B. It is not a recoverable schedule because a committed transaction () has read data from an aborted transaction.
C. It is not a recoverable schedule, which can lead to the effects of an aborted transaction being incorrectly persisted.
D. It violates the strict property, requiring complex recovery logic for before-images.

55 In a database system using Timestamp Ordering (TO) protocol, transaction with timestamp issues a read(A). Later, transaction with timestamp issues a write(A). Finally, transaction with issues a read(A). Let the initial Read-Timestamp and Write-Timestamp of A be and . What is the outcome for the three transactions?

concurrency control Hard
A. All three transactions succeed.
B. succeeds, but is aborted for violating the read timestamp of A, and is subsequently also aborted.
C. succeeds, but and are aborted.
D. and succeed, but is aborted because its timestamp is smaller than the Write-Timestamp of A.

56 A transaction enters the ACTIVE state, performs several reads and writes, and then issues a COMMIT command. The system successfully writes the commit record to the transaction log on stable storage, but before it can flush all the modified data blocks from its buffer cache to disk, a system crash occurs. After the system restarts, what is the state of this transaction and how will the recovery manager handle it?

transaction system concepts Hard
A. The transaction is in a PARTIALLY COMMITTED state, and the system must UNDO its changes to ensure atomicity.
B. The transaction is considered ACTIVE and will be rolled back because the end-of-transaction marker was not found in the data files.
C. The transaction is considered ABORTED, because the data was not physically written to disk, and it will be UNDONE.
D. The transaction is considered COMMITTED, and its changes will be REDONE from the log to ensure durability.

57 A stored procedure sp_A calls another stored procedure sp_B. sp_A starts a transaction, calls sp_B, does more work, and then commits. sp_B also contains BEGIN TRANSACTION and COMMIT statements. In a system like SQL Server, what is the effect of the COMMIT TRANSACTION statement inside the nested procedure sp_B?
sql
-- Procedure B
CREATE PROCEDURE sp_B AS
BEGIN
BEGIN TRANSACTION;
UPDATE T2 SET col = 2;
COMMIT TRANSACTION; -- What does this do?
END;

-- Procedure A
CREATE PROCEDURE sp_A AS
BEGIN
BEGIN TRANSACTION;
EXEC sp_B;
UPDATE T1 SET col = 1;
COMMIT TRANSACTION;
END;

stored procedures Hard
A. It only decrements an internal transaction counter (@@TRANCOUNT); the actual commit happens only at the end of sp_A.
B. It causes a runtime error because nested COMMIT statements are not permitted.
C. It commits the update to T2 immediately, making it a separate, autonomous transaction.
D. It releases locks acquired by sp_B but does not make the changes to T2 durable.

58 Analyze the following schedule and identify all the classic concurrency problems it exhibits:
(Result is 500)


(Result is 600)

schedules Hard
A. Dirty Read and Phantom Read.
B. Non-Repeatable Read only.
C. Phantom Read only.
D. Phantom Read and Non-Repeatable Read.

59 In a system where query performance is critical, a developer uses a scalar user-defined function (UDF) in the WHERE clause of a query that runs against a table with millions of rows. For example: SELECT * FROM Orders WHERE dbo.IsHighValue(order_total) = 1;. Even though dbo.IsHighValue contains simple logic and an index exists on the order_total column, the query performs very poorly. What is the most likely reason for this performance degradation?

functions Hard
A. The use of a scalar UDF in the WHERE clause makes the predicate non-SARGable, preventing the query optimizer from using an index seek.
B. The UDF cannot be parallelized, forcing the entire multi-million row query to run on a single processor core.
C. The UDF causes the transaction isolation level to be implicitly escalated to SERIALIZABLE, leading to increased locking and blocking.
D. The function introduces excessive CPU overhead for each row, which outweighs the benefit of the index.

60 Which of the following statements most accurately describes the fundamental relationship between conflict serializability and view serializability?

serializability of schedules Hard
A. The set of conflict serializable schedules is a proper subset of the set of view serializable schedules.
B. The sets of conflict serializable and view serializable schedules are disjoint.
C. The set of view serializable schedules is a proper subset of the set of conflict serializable schedules.
D. The sets of conflict serializable and view serializable schedules are identical.