Search Header Logo

DBMS QUIZ-III

Authored by Rahul Kumar

Computers

University

Used 4+ times

DBMS QUIZ-III
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In a database, you have a "Sales" relation that contains information about sales transactions, including the sale date. You want to find the maximum sale date. Which relational algebra operation would you use?

SELECT

PROJECT

AGGREGATE

JOIN

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

All NOT NULL columns from the base table must be included in the view in order for the INSERT  query to function.

TRUE

FALSE

All NULL columns from the base table must be included in the view in order for the INSERT query to function

None of the above

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A user initiates a transaction to retrieve the average salary of employees from a table named employees. Which SQL statement should be used to calculate the average salary within the transaction?

SELECT AVG(salary) FROM employees;

CALCULATE AVERAGE salary FROM employees;

AVERAGE SELECT salary FROM employees;

GET AVG(salary) FROM employees;

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

An e-commerce website processes a customer's order, which involves deducting the item quantity from the inventory. If any part of the transaction fails, the system needs to revert all changes made by the transaction. Which SQL statement is used to roll back a transaction?

ROLLBACK

COMMIT

SAVEPOINT

REVERT

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In a banking database, a customer initiates a fund transfer between two accounts. The transaction should either be fully completed or fully rolled back in case of an error. Which SQL statement is used to commit a transaction?

COMMIT

END TRANSACTION

FINALIZE

COMMIT TRANSACTION

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A database application maintains employee records. An administrator initiates a batch process to update the salary of all employees. If any part of the batch fails, the system needs to roll back all changes made so far. Which SQL statement is used to set a savepoint within a transaction?

SET SAVEPOINT

SAVEPOINT

DECLARE SAVEPOINT

TRANSACTION SAVEPOINT

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Scenario: A database contains a table named products with columns product_id, product_name, and price. A user initiates a transaction to update the price of a specific product with product_id = 102 to $25. Which SQL statement should be used to perform this update within the transaction?

MODIFY products SET price = 25 WHERE product_id = 102;

ALTER products SET price = 25 WHERE product_id = 102;

UPDATE products SET price = 25 WHERE product_id = 102;

CHANGE products SET price = 25 WHERE product_id = 102;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?