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

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

1. Which of the reasons will force you to use XML data model in SQL Server?
a) Your data is sparse or you do not know the structure of the data
b) Your data represents containment hierarchy
c) Order is inherent in your data
d) All of the Mentioned
View Answer

Answer: d
Explanation: XML is a good choice if you want a platform-independent model in order to ensure the portability of the data by using structural and semantic markup.

2. Which of the following is not a XML storage option?
a) Native storage as XML data type
b) Mapping between XML and relational storage
c) Small object storage
d) None of the Mentioned
View Answer

Answer: c
Explanation: XML uses large object storage which uses varchar(max) and varbinary(max).

3. The choice of XML technology, native XML versus XML view, generally depends upon the following factors?
a) Storage options
b) Query capabilities
c) Indexing
d) All of the Mentioned
View Answer

Answer: d
Explanation: Different XML choices may also have different performance characteristics.
advertisement
advertisement

4. In which of the following scenario, using XML native storage would be inappropriate?
a) Fixed schema
b) You want to query and modify your XML data
c) You want to index the XML data for faster query processing
d) Your application needs system catalog views to administer your XML data and XML schema
View Answer

Answer: a
Explanation: XML is appropriate when we may or may not have a schema for your XML data.

5. XML View Technology is useful in the following situations?
a) Your application needs system catalog views to administer your XML data and XML schema
b) Indexing Capabilities
c) You want to bulk load XML data and decompose them into the underlying tables by using the XML view
d) None of the Mentioned
View Answer

Answer: c
Explanation: XML bulk load can be used to populate the underlying tables by using the XML view.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. What is the hybrid model in SQL Server?
a) Combination of relational and XML data type columns
b) Combination of relational and non relational data type columns
c) Using XML with views
d) Using XML with triggers
View Answer

Answer: a
Explanation: Hybrid model may yield better performance in that you have more control over the indexes created on the relational columns and locking characteristics.

7. Reasons to use native XML features in SQL Server instead of managing your XML data in the file system would be:
a) You need language support for query and data modification for cross-domain applications
b) You want the server to guarantee that the data is well formed and also optionally validate your data according to XML schema
c) You want indexing of XML data for efficient query processing and good scalability, and the use of a first-rate query optimizer
d) All of the mentioned
View Answer

Answer: d
Explanation: If none of these conditions is satisfied, it may be better to store your data as a non-XML, large object type, such as varchar(max) or varbinary(max).
advertisement

8. Which of the following part of the XML data stored in an XML column is very important for locking?
a) Granularity
b) Degree of Structure
c) Hierarchy
d) None of the mentioned
View Answer

Answer: a
Explanation: When the granularity is large, locking large XML instances for updates causes throughput to decline in a multi user scenario.

9. XML datatype was introduced in which of the following versions of SQL Server?
a) SQL Server 2000
b) SQL Server 2005
c) SQL Server 2008
d) SQL Server 2012
View Answer

Answer: b
Explanation: XML data type allows variables and columns to be created to specifically hold xml data, whether it be an entire XML document or just some XML content.
advertisement

10. Which of the following feature of SQL Server was used before XML technology for semi structured data?
a) Stored Procedure
b) Dynamic management views
c) In memory database
d) None of the mentioned
View Answer

Answer: a
Explanation: You need to create a stored procedure to process incoming XML from a partner before SQL Server 2005.

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.