PrepAway - Latest Free Exam Questions & Answers

Which of the following is used to give a default value to a column if the value for that column is unknown?

Which of the following is used to give a default value to a column if the value for that column is unknown?

PrepAway - Latest Free Exam Questions & Answers

A.
Concurrency

B.
DEFAULT constraint

C.
Nested transaction

D.
Transaction

Explanation:
The DEFAULT constraint is a constraint in which a default value is given to a column if the value for that
column is unknown. If a user does not provide any value for that column, the default value is automatically
inserted. If a default value is not provided, then NULL is inserted. If a column does not allow NULL value and a
default value is also not assigned for that column,an error is sent by the database engine.
Answer D is incorrect. A transaction is a logical unit or work, where related DML statements are grouped
together. When a transaction is active, either all the statements in the transaction will complete successfully or
none of them will run. This means that if any of the statements in the transaction fails due to any reason, the
whole transaction will be rolled back. Transactionsare ended by using the COMMIT or ROLLBACK statement.
A perfect example would be a bank transaction, where a check deposit should cause a debit in the check
issuer’s account and a credit in the depositor’s account. If any one operation fails, the bank should reverse the
whole transaction, thus maintaining correct balances in both the accounts.
Answer C is incorrect. A nested transaction occurs when a new transaction is started by an instructionthat is
already inside an existing transaction. The new transaction is said to be nested within the existing transaction.
Nested transactions are implemented differently in databases. However, these nested transactions have in
common that the changes are not made visible to anyunrelated transactions until the outermost transaction
has committed. This means that a commit in an innertransaction does not necessary persist updates to the
database. Answer A is incorrect. Concurrency is theability of several users to access data from the database
simultaneously. Database concurrency increases whenthe number of simultaneous operations that the
database engine can support is large. In Microsoft SQL Server 2008 Compact 3.5, concurrency control is
achieved by using locks to protect data. The locks control how multiple users can access and modify shared
data simultaneously without conflicting with each other.


Leave a Reply