SQL Server Questions and Answers – Working With XML Data – 3

This set of SQL Server Test focuses on “Working With XML Data – 3”.

1. Which of the following is not a xml data type method?
a) query()
b) value()
c) nodes()
d) none of the Mentioned
View Answer

Answer: d
Explanation: The XML data type comes with four methods that assist with querying and manipulating the XML data stored in the column or variable. Those methods are query(), value(), nodes() and modify().

2. Which of the following indexes can be created on XML columns?
a) Primary
b) Secondary
c) Full-text
d) All of the Mentioned
View Answer

Answer: d
Explanation: You can also create full-text indexes on XML columns. However, the indexes ignore the XML markup and include only element content.

3. SQL Server lets you define how many types of secondary XML indexes?
a) 3
b) 4
c) 5
d) 6
View Answer

Answer: a
Explanation: Secondary indexes are PATH, VALUE, and PROPERTY.
advertisement
advertisement

4. What is the purpose of the primary XML index?
a) Persisted representation of data
b) Shredded representation of data
c) Structured representation of data
d) None of the Mentioned
View Answer

Answer: d
Explanation: Primary indexes all tags, paths, and values, along with such details as node type and document order information.

5. Statement for dropping XML index is __________
a) DROP INDEX
b) DELETE INDEX
c) REMOVE INDEX
d) None of the Mentioned
View Answer

Answer: a
Explanation: The DROP INDEX (Transact-SQL) Transact-SQL statement can be used to drop existing primary or secondary XML and non-XML indexes.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Different xml modes available for xml clauses are __________
a) RAW
b) AUTO
c) PATH
d) All of the mentioned
View Answer

Answer: d
Explanation: Within the FOR XML clause,we specify an XML mode: RAW, AUTO, EXPLICIT or PATH.

7. Sample applications to illustrate XML functionality in SQL Server are _____________
a) Implementing XML in SQL Server
b) XmlOnlineCatalog
c) XmlSurvey
d) All of the mentioned
View Answer

Answer: d
Explanation: Sample application are mostly written in Production.ProductModel table.
advertisement

8. Following content of XML elements are indexed in full text?
a) Content of the XML value
b) Non numerical value in content of XML attributes
c) The content of XML elements.
d) None of the mentioned
View Answer

Answer: b
Explanation: The content of XML attributes of the top-level element only, unless those values are numeric values are indexed only.

9. Which of the following function is contained by both full text search and Xquery?
a) search()
b) contain()
c) contains()
d) query()
View Answer

Answer: c
Explanation: A full-text search that uses contains() and XQuery contains() has different semantics.
advertisement

10. Point out the correct statement.
a) If ALTER INDEX ALL is specified, it applies to both non-XML and XML indexes
b) The rebuild and set option IGNORE_DUP_KEY is not valid for XML indexes
c) The option DROP_EXISTING is permitted in the ALTER INDEX statement
d) The modifications of the primary key constraint in the user table are not automatically propagated to XML indexes
View Answer

Answer: c
Explanation: The user must drop the XML indexes first and then re-create them.

Sanfoundry Global Education & Learning Series – SQL Server.

To practice all areas of SQL Server for various tests, 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.