CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Database Management
A firm's database administrator runs a DELETE statement without a WHERE clause inside a transaction that has not been committed, then realises the error. Which statement is correct?
Issuing ROLLBACK restores the deleted rows. DELETE is a DML command, so until the transaction is committed its effect can be undone. It removes rows, not table structure, and GRANT only controls privileges and cannot recover data.
- AIssuing ROLLBACK restores the deleted rowsCorrect
- BRows are gone permanently because DELETE auto-commits in all cases
- CDELETE without WHERE only removes the table structure
- DGRANT can be used to recover the rows
Explanation
DELETE is a DML command that removes rows and can be rolled back before COMMIT in a transactional database. It does not drop the table structure, and GRANT is a privilege command with no recovery function.
Did you get it right without looking?
One question tells you little. A timed set on Database Management shows your real accuracy, how long you take and where you lose marks.
More Database Management questions
- Referential integrity in a relational database ensures that:
- In the ETL process used to populate a data warehouse, a bank standardises date formats, removes duplicate customer records and converts all …
- A retail company copies sales, inventory and customer data from its separate operational systems into one central repository. The data is cl…
- A table Order_Items has composite primary key (Order_ID, Product_ID) and columns Product_Name, Quantity. Product_Name depends only on Produc…
- An employee of a Pune company, without permission of the owner, accesses the company's database and copies customer records for a competitor…
- A retail company stores customer data in separate flat files maintained by the sales, billing and delivery teams. The same customer's addres…