Database Questions and Answers – Transactions as SQL Statements

This set of Basic Database Questions and Answers focuses on “Transactions as SQL Statements”.

1. Which of the following is a property of transactions?
a) Atomicity
b) Concurrency
c) Isolation
d) All of the mentioned
View Answer

Answer: d
Explanation: Atomicity, Concurrency, Isolation, and Durability are essential properties of transactions in database systems. They ensure that transactions are executed consistently, efficiently, and reliably, maintaining data integrity and consistency.

2. SNAPSHOT is used for (DBA)
a) Synonym
b) Tablespace
c) System server
d) Dynamic data replication
View Answer

Answer: d
Explanation: Snapshot gets the instance of the database at that time.

3. Isolation of the transactions is ensured by
a) Transaction management
b) Application programmer
c) Concurrency control
d) Recovery management
View Answer

Answer: c
Explanation: ACID properties are the properties of transactions.
advertisement
advertisement

4. Constraint checking can be disabled in existing _______________ and _____________ constraints so that any data you modify or add to the table is not checked against the constraint.
a) CHECK, FOREIGN KEY
b) DELETE, FOREIGN KEY
c) CHECK, PRIMARY KEY
d) PRIMARY KEY, FOREIGN KEY
View Answer

Answer: a
Explanation: Check and foreign constraints are used to constraint the table data.

5. Problems occurs if we don’t implement a proper locking strategy
a) Dirty reads
b) Phantom reads
c) Lost updates
d) Unrepeatable reads
View Answer

Answer: d
Explanation: In a concurrent execution of these transactions, it is intuitively clear that they conflict, but this is a conflict not captured by our simple model. This situation is referred to as the phantom phenomenon, because a conflict may exist on “phantom” data.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which of the following fixed database roles can add or remove user IDs?
a) db_accessadmin
b) db_securityadmin
c) db_setupadmin
d) db_sysadmin
View Answer

Answer: a
Explanation: The database can be accessed by assigning the roles.

7. By default sql server has ___________ isolation level
a) READ COMMITTED
b) READ UNCOMMITTED
c) SERIALIZABLE
d) REPEATABLE READ
View Answer

Answer: a
Explanation: Read committed is used to commit the default read operation.
advertisement

8. Which of the following statements is/are not true for SQL profiler?
a) Enables you to monitor events
b) Check if rows are being inserted properly
c) Check the performance of a stored procedure
d) ALL of the mentioned
View Answer

Answer: c
Explanation: Read committed is used to commit the default read operation.

9. Which of the following is the original purpose of SQL?
a) To specify the syntax and semantics of SQL data definition language
b) To specify the syntax and semantics of SQL manipulation language
c) To define the data structures
d) All of the mentioned
View Answer

Answer: d
Explanation: Read committed is used to commit the default read operation.
advertisement

10. SQL can be used to:
a) Create database structures only
b) Query database data only
c) Modify database data only
d) All of the mentioned
View Answer

Answer: d
Explanation: In a concurrent execution of these transactions, it is intuitively clear that they conflict, but this is a conflict not captured by our simple model. This situation is referred to as the phantom phenomenon, because a conflict may exist on “phantom” data.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice basic questions and answers on all areas of Database, here is complete set on 1000+ Multiple Choice Questions and Answers on Database Management System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.