Basic Database Questions and Answers on “Transactions as SQL Statements”.
1. Which of the following is not a property of transactions?
a) Atomicity
b) Concurrency
c) Isolation
d) Durability
Answer: d
Clarification: ACID properties are the properties of transactions.
2. SNAPSHOT is used for (DBA)
a) Synonym
b) Tablespace
c) System server
d) Dynamic data replication
Answer: d
Clarification: 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
Answer: c
Clarification: 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
Answer: a
Clarification: 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
Answer: d
Clarification: 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
Answer: a
Clarification: 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
Answer: a
Clarification: 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
Answer: c
Clarification: 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
Answer: d
Clarification: 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
Answer: d
Clarification: 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.