Database management systems DBMS TRUE or FALSE questions with answers explained for competitive and entrance exams.
TRUE or FALSE questions in DBMS
1. We can optimize
query plans by pushing a selection down an expression tree, but not by moving a
selection up the tree.
(a)
TRUE (b) FALSE
View Answer
Answer:
FALSE
Usually it is good to push down
the selection operation. That is, we usually execute a selection operation as
early as possible in a query plan.
It depends on the type of
selection operation. For example, the selection condition with join operation
may be done later than the projection operation.
employee ⨝ssn=essn(πessn(dependent)
In this case, the project
operation is performed before because we may need only essn attribute from
dependent table to proceed further.
|
2. The LRU buffer
replacement algorithm should not be used for certain query operations, such as
nested-loop join.
(a) TRUE (b)
FALSE
View Answer
Answer:
TRUE
The goal of a replacement strategy
for blocks in the buffer is to minimize accesses to the disk. For
general-purpose programs, it is not possible to predict accurately, which
blocks will be referenced. Therefore, operating systems use the past pattern
of block references as a predictor of future references. The assumption
generally made is that blocks that have been referenced recently are likely
to be referenced again. Therefore, if a block must be replaced, the least
recently referenced block is replaced. This approach is called the least
recently used (LRU) block-replacement scheme.
As a database system is able to
predict the pattern of future references more accurately than an operating
system. MRU is the best strategy for nested-loop join. In MRU, for instance, in
the join operation, we move the most recently used block of inner table to
the disk once they are processed.
|
3. To process join
operation R ⨝ S,
we can choose any join methods: nested-loop, indexed nested-loop, sort merge, hash,
or hybrid. The only difference is their costs.
(a) TRUE (b) FALSE
View Answer
Answer:
FALSE
No. For example, we cannot perform
indexed nested-loop join if we don’t have indices on the join attribute.
Queries involving a natural join
may be processed in several ways, depending on the availability of indices
and the form of physical storage for the relations;
If tables are sorted, we can use
merge join
If join result is similar to that
of Cartesian product, block nested-loop may be desirable.
[include
reference]
|
4. Given an SQL
query, there are often multiple ways of writing it in relational algebra.
(a) TRUE (b)
FALSE
View Answer
Answer:
TRUE
An SQL query can be written in
multiple ways in relational algebra. It is very true for the SQL queies that
uses joins, selection of specific attributes and multiple conditions etc.
|
5. Triggers can
operate on insertion, deletion, and updates.
(a) TRUE (b) FALSE
View Answer
Answer:
TRUE
Triggers define actions to be
executed automatically when certain events occur and corresponding conditions
are satisfied. Trigger works on Event-Condition-Action (ECA) model.
Triggers can be defined to run before
or after the data manipulation language instructions. That is, actions can be
triggered when events like insertion, deletion and updates happen.
|
**********************
Related links:
- Go to DBMS General Quiz Questions Home page
- Go to DBMS All Quiz Questions Home page
- Go to Solved Exercises in DBMS Home page
- Quiz - TRUE / FALSE questions (Data storage and access)
- Quiz - True/False questions (Data storage and access)
- Quiz - True/False questions (index, B+ tree, fixed length records)
- Quiz - True/False questions (index, logging, 2PL)
- Quiz - True/False questions (schedules, triggers, keys)
No comments:
Post a Comment