SQL Server Questions and Answers – MDX – 1

This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “MDX – 1”.

1. _______ lets you manage cube context from within an MDX script.
a) CALCULATE
b) CALC
c) SCOPE CALC
d) None of the mentioned
View Answer

Answer: a
Explanation: In Microsoft SQL Server Analysis Services, a Multidimensional Expressions (MDX) script is made up of one or more MDX expressions or statements that populate a cube with calculations.

2. Point out the correct statement.
a) Few MDX queries run within a specified cube context
b) SELECT statement is the most frequently used query in MDX
c) When formulating a Multidimensional Expressions (MDX) SELECT statement, an application typically examines a cube and divides the set of hierarchies into three subsets
d) None of the mentioned
View Answer

Answer: b
Explanation: By understanding how an MDX SELECT statement must specify a result set, what the syntax of the SELECT statement is, and how to create a simple query using the SELECT statement, you will have a solid understanding of how to use MDX to query multidimensional data.

3. ________ causes the server to raise an error when Microsoft SQL Server Analysis Services finds any error in the MDX script.
a) Ignore
b) IgnoreNone
c) IgnoreAll
d) All of the mentioned
View Answer

Answer: b
Explanation: Error handling is done through the ScriptErrorHandlingMode enumerator.

4. The Backus-Naur Form (BNF) of {*(<comment> | <whitespace> | <newline>)} will be parsed as ______ for backwards compatibility.
a) {\}
b) {*}
c) {+}
d) {-}
View Answer

Answer: b
Explanation: By using calculated cells, the client application can specify a rollup value for a particular set of cells, instead of for an entire set of cells as in the case of a custom rollup formula or a calculated member.

advertisement
advertisement

5. Point out the wrong statement.
a) The WHERE clause describes the slicer axis in an MDX query
b) MDX syntax distinguishes sets by surrounding tuples or members with braces
c) MDX queries can have three query axes in the SELECT statement
d) None of the mentioned
View Answer

Answer: c
Explanation: Each axis behaves in exactly the same way, unlike SQL where there are significant differences between how the rows and the columns of a query behave.

6. ___________ creates a calculation that evaluates a Multidimensional Expressions (MDX) expression over a specified set of tuples within a cube.
a) CREATE CELL CALCULATION
b) CREATE CELL CALC
c) CREATE MEMBER CALCULATION
d) None of the mentioned
View Answer

Answer: a
Explanation: CREATE CELL CALCULATION statement creates a calculated cell formula for a specified set of tuples within a cube.

Note: Join free Sanfoundry classes at Telegram or Youtube

7. The following code is a syntax of which statement?

CREATE [ SESSION ] [HIDDEN] [ CALCULATED ] MEMBER CURRENTCUBE | Cube_Name.Member_Name 
   AS MDX_Expression
      [,Property_Name = Property_Value, ...n]
......[,SCOPE_ISOLATION = CUBE]

a) CREATE SESSION
b) CREATE CUBE
c) CREATE MEMBER
d) CREATE MDX
View Answer

Answer: c
Explanation: CREATE MEMBER creates a calculated member.

advertisement

8. Which of the following is valid syntax for CREATE GLOBAL CUBE?
a)

advertisement
CREATE GLOBAL CUBE [LocalReseller]
   Storage 'C:\LocalAWReseller1.cub'
   FROM [Adventure Works]
   (
      MEASURE  [Adventure Works].[Reseller Sales Amount],
      DIMENSION [Adventure Works].[Reseller],
      DIMENSION [Adventure Works].[DATE]
   )

b)

CREATE GLOBAL CUBE [LocalReseller]
   FROM [Adventure Works]
   (
      MEASURE  [Adventure Works].[Reseller Sales Amount],
      DIMENSION [Adventure Works].[Reseller],
      DIMENSION [Adventure Works].[DATE]
   )

c)

CREATE GLOBAL CUBE [LocalReseller]
   Storage 'C:\LocalAWReseller1.cub'
   (
      MEASURE  [Adventure Works].[Reseller Sales Amount],
      DIMENSION [Adventure Works].[Reseller],
      DIMENSION [Adventure Works].[DATE]
   )

d) All of the mentioned
View Answer

Answer: a
Explanation: The preceding syntax demonstrates creating a local, persisted version of the Adventure Works cube that contains only the Reseller Sales Amount measure, the Reseller dimension, and the Date dimension.

9. Which of the following is the MDX Data Definition Statement?
a) CREATE ACTION
b) DROP CUBE
c) CREATE CUBE
d) None of the mentioned
View Answer

Answer: a
Explanation: Creates an action that can be associated with a cube, dimension, hierarchy, or subordinate object.

10. Valid syntax for REFRESH CUBE statement is ____________
a) REFRESH CUBECube_Name
b) REFRESH CUBE Cube_Name
c) REFRESH CUBE “Cube_Name”
d) REFRESH CUBE \Cube_Name\
View Answer

Answer: a
Explanation: REFRESH CUBECube_Name refreshes the client’s cache for a cube.

Sanfoundry Global Education & Learning Series – SQL Server.

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.