SQL Server Questions and Answers – MDX – 2

«
»

This set of Basic SQL Server Interview questions and answers focuses on “MDX – 2”.

1. __________ is the set of hierarchies from which data is retrieved for a single member.
a) Slicer axis
b) Query axes
c) Dice axis
d) All of the mentioned
View Answer

Answer: a
Explanation: query and slicer axes can be constructed from multiple hierarchies of the cube to be queried

2. Point out the correct statement.
a) Only dropping the default member is supported in MDX Scripting
b) In the SELECT statement, the FROM clause determines the cube context
c) Very few cube can control how errors within a Multidimensional Expressions (MDX) script are handled
d) None of the mentioned
View Answer

Answer: b
Explanation: This context can be the whole cube or just a subcube from that cube. Having specified cube context through the FROM clause, you can use additional functions to expand or restrict that context.

advertisement

3. When you include a many-to-many dimension, which of the following rules apply?
a) You must add the intermediary measure group
b) You must add the entire many-to-many dimension
c) You must add the entirety of all dimensions common to the two measure groups involved in the many-to-may relationship
d) All of the mentioned
View Answer

Answer: d
Explanation: Reference dimensions are materialized and added as regular dimensions.

4. _________ statement is used to write back data to any cell in a cube that aggregates to its parent using the SUM aggregation.
a) UPDATE CUBE
b) DELETE CUBE
c) ALTER CUBE
d) None of the mentioned
View Answer

Answer: a
Explanation: You can update the value of a specified leaf or non leaf cell in a cube, optionally allocating the value for a specified non-leaf cell across dependent leaf cells.

5. Point out the wrong statement.
a) A weight expression should be expressed as a decimal value between zero (0) and 1
b) Each UPDATE CUBE allocation should be considered to be atomic for transactional purposes
c) When updated cells overlap, the Update Isolation Level connection string property can be used to enhance performance for UPDATE CUBE
d) None of the mentioned
View Answer

Answer: c
Explanation: When updated cells do not overlap, the Update Isolation Level connection string property can be used to enhance performance for UPDATE CUBE.

6. Which of the following scenario demonstrates USE_EQUAL_INCREMENT allocation method?
a)

advertisement
<leaf cell value> = 
<NEW Value> / COUNT(leaf cells that are contained IN <tuple>)

b)

<leaf cell value> = < NEW Value> * Weight_Expression

c)

<leaf cell value> = <leaf cell value> + 
(<NEW VALUE > - <existing value>) /
COUNT(leaf cells contained IN <tuple>)

d)

advertisement
<leaf cell value> = <leaf cell value> + 
(<NEW Value> - <existing value>)  * Weight_Expression
View Answer
Answer: c
Explanation: Every leaf cell that contributes to the updated cell will be changed.

7. If a weight expression is not specified, the UPDATE CUBE statement implicitly uses which of the following expression?
a) Weight_Expression = <leaf cell value> * <existing value>
b) Weight_Expression = <leaf cell value> / <existing value>
c) Weight_Expression = <leaf cell value> – <existing value>
d) Weight_Expression = <leaf cell value> + <existing value>
View Answer

Answer: b
Explanation: It may be helpful to think of the UPDATE CUBE statement as a subroutine that will automatically generate a series of individual cell writeback operations to leaf and non-leaf cells that will roll up into a specified sum.

8. When used on a measure that contains integers, the _________ method can return imprecise results caused by incremental rounding changes.
a) USE_EQUAL_ALLOCATION
b) USE_WEIGHTED_ALLOCATION
c) USE_WEIGHTED_INCREMENT
d) All of the mentioned
View Answer

Answer: b
Explanation: Every leaf cell that contributes to the updated cell will be assigned an equal value

9. Which of the following is valid syntax for DRILLTHROUGH statement?
a)

advertisement
DRILLTHROUGH[MAXROWSUnsigned_Integer] 
      <MDX SELECT statement> 
      [RETURNSet_of_Attributes_and_Measures 
            [,Set_of_Attributes_and_Measures ...]
      ]

b)

DRILL[MAXROWSUnsigned_Integer] 
      <MDX SELECT statement> 
      [RETURNSet_of_Attributes_and_Measures 
            [,Set_of_Attributes_and_Measures ...]
      ]

c)

DRILLTHROUGH[MAXROWSUnsigned_Integer] 
      <MDX SELECT statement>

d) None of the mentioned
View Answer

Answer: a
Explanation: DRILLTHROUGH statement retrieves the underlying table rows that were used to create a specified cell in a cube.

10. Which of the following keyword forces a specified set to be evaluated within the current context?
a) SCOPE
b) CASE
c) EXISTING
d) FREEZE
View Answer

Answer: c
Explanation: By default, sets are evaluated within the context of the cube that contains the members of the set.

Sanfoundry Global Education & Learning Series – SQL Server.

To practice basic interview questions on all areas of SQL Server, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn