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
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
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
Explanation: ACID properties are the properties of transactions.
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
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
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.
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
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
Explanation: Read committed is used to commit the default read operation.
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
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
Explanation: Read committed is used to commit the default read operation.
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
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.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Practice Computer Science MCQs
- Check Computer Science Books
- Practice Programming MCQs
- Practice RDBMS MCQ
- Check Programming Books