Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

If a query is optimized without providing specific values for its parameters the technique is called __________(a) Complex query handling(b) Multi query optimization(c) Complex query optimization(d) Parametric query optimizationI had been asked this question during an interview.My query is from Materialized Views and Advanced Topics in Query Optimization in section Query Processing and Optimization of RDBMS

Answer»

Right answer is (d) PARAMETRIC QUERY optimization

Easy EXPLANATION: If a query is optimized without providing specific VALUES for its parameters the technique is called parametric query optimization.

2.

Which of the following is a multi-query optimization technique(a) Shared scan optimization(b) Parametric query optimization(c) Index optimization(d) All of the mentionedThe question was asked during an interview.I want to ask this question from Materialized Views and Advanced Topics in Query Optimization topic in chapter Query Processing and Optimization of RDBMS

Answer» RIGHT answer is (a) SHARED scan OPTIMIZATION

To ELABORATE: Shared scan optimization is a multi QUERY optimization technique.
3.

Reducing the complexity of complex queries by similarly handling sub-queries is known as ______(a) Complex query handling(b) Multi query optimization(c) Complex query optimization(d) Parametric query optimizationThis question was addressed to me in semester exam.The query is from Materialized Views and Advanced Topics in Query Optimization topic in portion Query Processing and Optimization of RDBMS

Answer»

The correct CHOICE is (b) Multi QUERY optimization

For explanation: REDUCING the complexity of complex queries by similarly handling sub-queries is KNOWN as multi query optimization.

4.

The problem of an update affecting the execution of a query associated with the update is known as the _________(a) Updation problem(b) Incremental problem(c) Halloween problem(d) Optimization problemThe question was posed to me by my college professor while I was bunking the class.Enquiry is from Materialized Views and Advanced Topics in Query Optimization topic in section Query Processing and Optimization of RDBMS

Answer»

Correct ANSWER is (c) Halloween problem

For explanation I would SAY: The problem of an update affecting the EXECUTION of a query associated with the update is known as the Halloween problem. This was because it was first recognized on the Halloween day at IBM.

5.

The sequence of queries that reflect the typical load on the system are known as ________(a) Efficacies(b) Workload(c) Selection(d) BalancersThis question was posed to me during an interview.My enquiry is from Materialized Views and Advanced Topics in Query Optimization in division Query Processing and Optimization of RDBMS

Answer»

The correct CHOICE is (B) Workload

The BEST I can explain: The sequence of queries that reflect the typical workload on the SYSTEM are known as workload.

6.

What are differentials in view management?(a) The differences between relations(b) The changes made to a relation(c) Thechanges made to an expression(d) More than one of the mentionedI had been asked this question in a national level competition.This question is from Materialized Views and Advanced Topics in Query Optimization in section Query Processing and Optimization of RDBMS

Answer»

Right ANSWER is (d) More than one of the mentioned

The best I can explain: The changes MADE to a relation or and expression are known as DIFFERENTIALS in materialized VIEW MANAGEMENT.

7.

Which of the following is a type of materialized view management?(a) Incremental view management(b) Immediate view management(c) Deferred view management(d) All of the mentionedThe question was asked in an interview.Question is from Materialized Views and Advanced Topics in Query Optimization topic in chapter Query Processing and Optimization of RDBMS

Answer»

Right option is (d) All of the mentioned

The best I can explain: Incremental, immediate and DEFERRED are all different types of MATERIALIZED VIEW management TECHNIQUES. Most database systems perform immediate view management.

8.

What is incremental materialized view maintenance?(a) Modifying all the parts of the view(b) Modifying only the affected parts of the view(c) Not modifying the view(d) None of the mentionedThis question was addressed to me in an interview.I'm obligated to ask this question of Materialized Views and Advanced Topics in Query Optimization topic in chapter Query Processing and Optimization of RDBMS

Answer»

Correct CHOICE is (b) Modifying only the affected parts of the view

Explanation: Modifying only the affected parts of the materialized view is called as INCREMENTAL view maintenance. It is MUCH more efficient than ORDINARY view management.

9.

The task of keeping a view up to date with the underlying data is called as ________(a) View handling(b) View maintenance(c) View management(d) None of the mentionedThis question was addressed to me during an internship interview.I'm obligated to ask this question of Materialized Views and Advanced Topics in Query Optimization in chapter Query Processing and Optimization of RDBMS

Answer»

The correct choice is (b) View maintenance

Best explanation: The TASK of KEEPING a view up to DATE with the UNDERLYING DATA is called as view maintenance.

10.

A view whose contents are computed and stored is called as _______(a) Storage view(b) Backup view(c) Materialized view(d) Advanced viewI got this question in an online interview.My doubt stems from Materialized Views and Advanced Topics in Query Optimization in portion Query Processing and Optimization of RDBMS

Answer»

Correct choice is (c) Materialized VIEW

Explanation: A view whose CONTENTS are computed and STORED is called as a materialized view. I does not only STORE the QUERY defining the view.

11.

The process of replacing a nested query with a query with a join is known as _________(a) Correlation(b) Decorrelation(c) Cache handling(d) Join replacementI had been asked this question in exam.This is a very interesting question from Choice of Evaluation Plans topic in section Query Processing and Optimization of RDBMS

Answer»

Right answer is (b) Decorrelation

Easiest explanation: The PROCESS of replacing a nested query with a query with a join is KNOWN as decorrelation. It is more COMPLICATED when the nested sub query uses aggregate functions INSIDE it.

12.

What technique is used for the evaluation of a query with a nested sub query?(a) Caching(b) Decorrelated evaluation(c) Correlated evaluation(d) Time based evaluationThe question was posed to me in an interview for internship.I would like to ask this question from Choice of Evaluation Plans in portion Query Processing and Optimization of RDBMS

Answer»

The correct CHOICE is (c) Correlated evaluation

For explanation I would SAY: The technique used to EVALUATE a query with a nested SUB query is called as correlated evaluation. It is not very efficient as a large number of I/O operations may occur.

13.

Caching and reuse of query plans is called as ________(a) Query caching(b) Plan caching(c) Plan memorizing(d) None of the mentionedThe question was asked in exam.Question is taken from Choice of Evaluation Plans topic in portion Query Processing and Optimization of RDBMS

Answer»

Correct option is (b) Plan caching

Easy explanation: Caching and REUSE of query plans is called as plan caching. It is used because the OPTIMAL plan for the NEW constants may differ from the optimal plan for the initial VALUES.

14.

The join orders where the right operand of each join is in one of the initial relations are called as ________(a) Right deep join orders(b) Left deep join orders(c) Outer join orders(d) None of the mentionedI had been asked this question in an interview for internship.This intriguing question originated from Choice of Evaluation Plans in chapter Query Processing and Optimization of RDBMS

Answer» CORRECT OPTION is (b) Left deep JOIN orders

For explanation I would SAY: The join orders where the right operand of each join is in one of the INITIAL relations are called as left deep join orders.
15.

Optimizers use __________ to reduce the cost of optimization.(a) Analyzers(b) Statistics(c) Heuristics(d) CachesI have been asked this question in a national level competition.I need to ask this question from Choice of Evaluation Plans in section Query Processing and Optimization of RDBMS

Answer»

Correct ANSWER is (c) Heuristics

Explanation: Cost BASED optimizers may be expensive as EXPLORING SPACE of all possible PLANS might prove to be costly. So, optimizers use heuristics to reduce the cost of optimization.

16.

State true or false: Making multiple copies of the same sub-expressions must be avoided(a) True(b) FalseI have been asked this question during an interview.Asked question is from Choice of Evaluation Plans in chapter Query Processing and Optimization of RDBMS

Answer» CORRECT ANSWER is (a) True

The explanation is: For promoting SPACE efficiency, making multiple copies of the same sub-expressions must be AVOIDED.
17.

The rule that allows transformation of a logical operation to a physical operation is called(a) Logical equivalence rule(b) Physical equivalence rule(c) Memory equivalence rule(d) None of the mentionedThis question was addressed to me in an online quiz.My doubt is from Choice of Evaluation Plans topic in section Query Processing and Optimization of RDBMS

Answer»

Correct answer is (B) Physical equivalence rule

For explanation I WOULD say: The rule that allows transformation of a logical operation to a physical operation is called as a physical equivalence rule. It is a new CLASS of equivalence RULES.

18.

A particular sort order is said to be _________ sort order if it could be useful for a later operation.(a) Interesting(b) Reusable(c) Efficient(d) GoodThe question was posed to me in an international level competition.This interesting question is from Choice of Evaluation Plans in portion Query Processing and Optimization of RDBMS

Answer»

Correct OPTION is (a) Interesting

For explanation: A particular sort order is SAID to be interesting-sort order if it could be useful for a LATER operation.

19.

What is the disadvantage of cost based optimizers?(a) It is too expensive(b) It is inefficient in producing results(c) It does not perform the desired function(d) None of the mentionedI got this question in a job interview.The origin of the question is Choice of Evaluation Plans topic in portion Query Processing and Optimization of RDBMS

Answer»

Right answer is (a) It is too EXPENSIVE

The explanation: Cost based optimizers MAY be expensive as exploring space of all possible PLANS might PROVE to be costly.

20.

A ________ explores the space of all query evaluation plans that are equivalent to a given query.(a) Cost based optimizer(b) Space based optimizer(c) Time based optimizer(d) None of the mentionedThe question was asked in exam.My question is taken from Choice of Evaluation Plans topic in division Query Processing and Optimization of RDBMS

Answer»

Correct option is (a) Cost based optimizer

Explanation: A cost based optimizer EXPLORES the SPACE of all query evaluation plans that are equivalent to a given query, and chooses the one with the least ESTIMATED cost.

21.

The size of a _____ is simply V(A,r) where r is the relation and A is a distinct value(a) Projection(b) Outer join(c) Aggregation(d) Inner joinThe question was posed to me in an interview.I'm obligated to ask this question of Estimating Statistics of Expression Results topic in section Query Processing and Optimization of RDBMS

Answer»

Correct answer is (c) Aggregation

Explanation: The SIZE of an aggregation is simply V(A,r) where r is the relation and A is a DISTINCT value SINCE there is one tuple in the aggregation for every distinct value in A.

22.

Size estimation can be done for which of the following processes?(a) Projection(b) Aggregation(c) Set operation(d) All of the mentionedThe question was asked in semester exam.The above asked question is from Estimating Statistics of Expression Results in portion Query Processing and Optimization of RDBMS

Answer»

Right choice is (d) All of the mentioned

The best explanation: Size estimation can be done for projection, aggregation, set operations, join operations and ALSO the SELECTION OPERATION.

23.

State true or false: Estimation of the size of the result of a join is not possible(a) True(b) FalseI have been asked this question in an internship interview.The origin of the question is Estimating Statistics of Expression Results in portion Query Processing and Optimization of RDBMS

Answer»

Right option is (b) False

To explain: Estimation of the RESULT of a join is possible and can be done USING the Cartesian product and intersections of the two relations. It is more complicated than estimating SIZE of a selection.

24.

The intersection of all records satisfying the individual simple conditions Oi is called as ________(a) Conjunctive selection(b) Disjunctive selection(c) Negation(d) None of the mentionedThe question was asked in a job interview.The doubt is from Estimating Statistics of Expression Results topic in division Query Processing and Optimization of RDBMS

Answer»

Right CHOICE is (a) Conjunctive selection

The EXPLANATION: The intersection of all records satisfying the individual SIMPLE CONDITIONS Oi is called as conjunctive selection. It is a form of a complex selection.

25.

The union of all records satisfying the individual simple conditions Oi is called as ________(a) Conjunctive selection(b) Disjunctive selection(c) Negation(d) None of the mentionedThe question was asked during an internship interview.My question is based upon Estimating Statistics of Expression Results in portion Query Processing and Optimization of RDBMS

Answer»

Correct CHOICE is (B) Disjunctive selection

To EXPLAIN: The union of all RECORDS satisfying the INDIVIDUAL simple conditions Oi is called as disjunctive selection. It is a form of a complex selection.

26.

The ________ SQL command generates statistics on a particular relation(a) Statistic(b) Analyze(c) Modify(d) RunstatsI had been asked this question in semester exam.Question is from Estimating Statistics of Expression Results in section Query Processing and Optimization of RDBMS

Answer»

Correct CHOICE is (b) Analyze

For EXPLANATION I would say: The analyze command is USED to generate STATISTICS on a PARTICULAR set of relations. The runstats command is also valid but not in SQL. It is used in IBM DB2.

27.

What kind of a sample must be used for statistical analysis?(a) A random sample(b) A sample having excessive representation of a relation(c) A sample having suppressive representation of a relation(d) None of the mentionedI have been asked this question in an interview for internship.This is a very interesting question from Estimating Statistics of Expression Results topic in portion Query Processing and Optimization of RDBMS

Answer»

Correct option is (a) A random SAMPLE

The BEST I can explain: A random sample must be taken into consideration for STATISTICAL analysis because it gives a fair result on the DATA analysis.

28.

What is the function of the equi-width histogram?(a) Adjusts boundaries of the ranges such that each range has the same number of values(b) Divides range of values into equal sized ranges(c) Divides the range of values into ideally sized ranges(d) Does not divide the range of values.I had been asked this question in an online interview.My question is taken from Estimating Statistics of Expression Results topic in division Query Processing and Optimization of RDBMS

Answer»

Correct answer is (b) Divides range of values into EQUAL sized RANGES

To explain I WOULD say: The equi width HISTOGRAM divides the range of values into equal sized ranges.

29.

Most databases store the distribution of values for each attribute as a __________(a) Histogram(b) Pie chart(c) Line graph(d) None of the mentionedThe question was posed to me in class test.My query is from Estimating Statistics of Expression Results in division Query Processing and Optimization of RDBMS

Answer»

Correct choice is (a) Histogram

The EXPLANATION is: Most of the DATABASES store the DISTRIBUTION of values for each attribute as a histogram.in which the values for the ATTRIBUTES are divided into various RANGES.

30.

Which of the following information does the database system catalog store?(a) Number of tuples(b) Number of blocks(c) Size of a tuple of a relation(d) All of the mentionedI got this question in unit test.I'd like to ask this question from Estimating Statistics of Expression Results in chapter Query Processing and Optimization of RDBMS

Answer» CORRECT choice is (d) All of the mentioned

Easy explanation: The database system CATALOG STORES the number of TUPLES, number of blocks, SIZE of a tuple in a relation and the blocking factor in it as statistical data.
31.

State true or false: Multiple equivalence rules can be used one after the other on a query(a) True(b) FalseI have been asked this question during an interview.Asked question is from Transformation of Relational Expressions topic in portion Query Processing and Optimization of RDBMS

Answer»

The CORRECT answer is (a) True

For EXPLANATION I would say: Multiple EQUIVALENCE rules can be used one after the other on a QUERY or on parts of the query. This can be used to simplify the query greatly thus reducing its time COMPLEXITY.

32.

Which of the following set operations does the selection operation distribute over?(a) Union(b) Intersection(c) Difference(d) All of the mentionedThe question was posed to me in examination.My question comes from Transformation of Relational Expressions in chapter Query Processing and Optimization of RDBMS

Answer»

Correct answer is (d) All of the mentioned

The best explanation: The SELECTION OPERATION distributes over SET union, intersection, set difference.

33.

Which of the following operations is associative(a) Set union(b) Set intersection(c) Set difference(d) Theta joinI got this question during an interview for a job.The query is from Transformation of Relational Expressions topic in section Query Processing and Optimization of RDBMS

Answer» CORRECT option is (d) Theta join

Explanation: The theta join operation is associative within a certain set of CONDITIONS WHEREAS the rest of the operations are non-associative in each and EVERY CONDITION.
34.

Theta join operations are(a) Commutative(b) Associative(c) Distributive under projection(d) All of the mentionedThis question was addressed to me in a job interview.My question comes from Transformation of Relational Expressions topic in portion Query Processing and Optimization of RDBMS

Answer» RIGHT option is (d) All of the mentioned

For EXPLANATION: The THETA join operations are commutative, associative and are DISTRIBUTIVE under projection.
35.

If no rule can be derived from any combination of others then the set of rules is said to be ________(a) Primitive(b) Axiomatic(c) Minimal(d) AtomicThis question was addressed to me during an interview.The question is from Transformation of Relational Expressions in division Query Processing and Optimization of RDBMS

Answer»

Correct option is (c) Minimal

Explanation: A set of EQUIVALENCE RULES is said to be minimal if no rule can be DERIVED from any COMBINATION of others. Query optimizers use minimal sets of equivalence rules.

36.

State true or false: The projection operation does not distribute over the union operation(a) True(b) FalseThe question was posed to me in an internship interview.I want to ask this question from Transformation of Relational Expressions in chapter Query Processing and Optimization of RDBMS

Answer» RIGHT option is (B) False

Best explanation: The PROJECTION operation distributes over the UNION operation.
37.

Which of the following set operations is not commutative?(a) Union(b) Intersection(c) Set difference(d) None of the mentionedI had been asked this question in semester exam.The origin of the question is Transformation of Relational Expressions in section Query Processing and Optimization of RDBMS

Answer» RIGHT choice is (c) SET difference

For EXPLANATION I would say: The set difference operation is not commutative. As the position of the set difference OPERATOR affects the result of the operation.
38.

Which of the following operations are associative(a) Natural joins(b) Theta joins(c) Both the mentioned(d) None of the mentionedThe question was asked by my college professor while I was bunking the class.My question is based upon Transformation of Relational Expressions topic in portion Query Processing and Optimization of RDBMS

Answer» RIGHT choice is (c) Both the mentioned

Explanation: Both natural join operation and theta join operation are associative. The COMMUTATIVITY and ASSOCIATIVITY of the join OPERATIONS are important for join reordering in query OPTIMIZATION.
39.

State true or false: Selection operations are commutative(a) True(b) FalseThe question was posed to me in exam.My query is from Transformation of Relational Expressions in section Query Processing and Optimization of RDBMS

Answer» RIGHT CHOICE is (a) True

Easy explanation: Selection operations are commutative i.e. selection1(selection2(R)) = selection2(selection1(R)).
40.

If on every legal database instant, the two expressions generate the same set of tuples, the expressions are called as(a) Equal(b) Equivalent(c) Similar(d) IdenticalI have been asked this question in semester exam.My doubt stems from Transformation of Relational Expressions in section Query Processing and Optimization of RDBMS

Answer» RIGHT option is (b) Equivalent

Easy EXPLANATION: If on every legal database instant, the two expressions GENERATE the same set of tuples, the expressions are called as Equivalent relational algebra expressions. The order of the tuples is COMPLETELY irrelevant for EQUIVALENCY.
41.

Which of the following functions does an iterator not provide(a) Open()(b) Next()(c) Close()(d) Wait()I had been asked this question in a job interview.The question is from Evaluation of Expressions topic in division Query Processing and Optimization of RDBMS

Answer»

The correct answer is (d) Wait()

EXPLANATION: The ITERATOR does not provide the wait() FUNCTION but it provides OPEN(), NEXT() and close() operations.

42.

The usage of two buffers, with one continuing execution of the algorithm while the other is written is called as __________(a) Double execution(b) Multi tasking(c) Double buffering(d) Double algorithmThis question was posed to me in a national level competition.This is a very interesting question from Evaluation of Expressions in division Query Processing and Optimization of RDBMS

Answer» CORRECT option is (c) Double BUFFERING

For explanation: The usage of TWO buffers, with one continuing execution of the algorithm while the other is written is called as Double buffering. This MAKES the algorithm quicker by performing CPU operations simultaneously with the I/O operations.
43.

State true or false: Hybrid hash join is partially pipelined on the probe relation(a) True(b) FalseThe question was posed to me during an online interview.The origin of the question is Evaluation of Expressions in chapter Query Processing and Optimization of RDBMS

Answer»

The CORRECT answer is (a) True

The explanation is: Hybrid HASH JOIN is partially pipelined on the probe relation since it can output tuples from the first partition as tuples are RECEIVED for the probe relation.

44.

Which of the following techniques does not exist?(a) Pipelined join technique(b) Left pipelined join technique(c) Right pipelined join technique(d) None of the mentionedI had been asked this question by my school teacher while I was bunking the class.Enquiry is from Evaluation of Expressions topic in division Query Processing and Optimization of RDBMS

Answer»

Right choice is (d) None of the mentioned

Explanation: Pipelined join TECHNIQUE, both left and right are EVALUATION techniques that can be USED to organize DATA.

45.

State true or false: Join is an inherently blocking operation(a) True(b) FalseThis question was posed to me in semester exam.I need to ask this question from Evaluation of Expressions in portion Query Processing and Optimization of RDBMS

Answer»

Correct answer is (b) False

The explanation: JOIN is not an INHERENTLY blocking algorithm. This is because all the tuples NEED not be EXAMINED to execute the join operation.

46.

State true or false: Sorting is an inherently blocking operation(a) True(b) FalseThis question was addressed to me during an online exam.Question is taken from Evaluation of Expressions in portion Query Processing and Optimization of RDBMS

Answer»

The CORRECT answer is (a) True

Explanation: SORTING is an INHERENTLY blocking OPERATION i.e. output is not given until all the tuples from their input are EXAMINED

47.

If the operations do not wait to produce tuples, then it is called as _________(a) Demand driven pipeline(b) Producer driven pipeline(c) Query driven pipeline(d) None of the mentionedThis question was posed to me during an interview for a job.The above asked question is from Evaluation of Expressions topic in division Query Processing and Optimization of RDBMS

Answer»

The correct OPTION is (b) Producer driven pipeline

Explanation: If the operations do not WAIT to PRODUCE tuples, then it is called as producer driven pipeline. IT does not wait to produce tuples but it PRODUCES tuples eagerly.

48.

If the system makes repeated requests for tuples from the operation at the top of the table, it is called as _________(a) Demand driven pipeline(b) Producer driven pipeline(c) Query driven pipeline(d) None of the mentionedI had been asked this question in quiz.My doubt stems from Evaluation of Expressions topic in chapter Query Processing and Optimization of RDBMS

Answer» CORRECT option is (a) Demand driven pipeline

To explain: If the SYSTEM makes REPEATED requests for tuples from the operation at the top of the table, it is called as demand driven pipeline. Each time an operation receives a request for tuples, it COMPUTES the next TUPLE or tuples to be returned and then returns that tuple.
49.

The result of each intermediate operation are created and then are used for valuation of the next level operations, this evaluation is called as ________(a) Chain evaluation(b) Pipeline evaluation(c) Materialized evaluation(d) Demand driven evaluationI got this question in final exam.My question is from Evaluation of Expressions in section Query Processing and Optimization of RDBMS

Answer»

Correct choice is (c) Materialized evaluation

To explain I would say: The RESULT of each intermediate operation are created and then are USED foe valuation of the next level operations, this evaluation is CALLED as Materialized evaluation. This is not space effective as we need to construct the temporary relations which must be written to a DISK.

50.

If the results of one operation are passed on to the other, it is called as ________(a) Chain(b) Pipeline(c) Materialized(d) TreeI have been asked this question during an interview.My question is from Evaluation of Expressions topic in section Query Processing and Optimization of RDBMS

Answer»

The CORRECT choice is (b) Pipeline

The best I can explain: If the results of one operation are passed on to the other, it is called as PIPELINED. This can be used to EVALUATE several expressions SIMULTANEOUSLY.