What should you do?

Correct Answer for the following Question is given below

You are a database developer on an instance of SQL Server 2008.Weekly, your finance department receives XML from several branch offices. The data in these XML files must meet certain validation requirements. You currently have an XSD file that you want to use to validate the XML documents. What should you do?After the schema is registered, it can be associated with an XML document variable, parameter or xml data type column, and used to validate the XML. For example, if you previously registered a schema collection named VendorSchema, you could use the following statements to declare an xml variable or create a table containing an xml column with validation:DECLARE @VendorData xml (VendorSchema);CREATE PROCEDURE [email protected] xml (VendorSchema)AS…CREATE TABLE Vendor (ID int PRIMARY KEY,VendorData xml (VendorSchema));You should not use OPENXML including a WITH clause. OPENXML is a rowset provider function that creates a relational view of data contained in an XML document.This function can be used in SELECT statements where a table or view would be specified to extract data from an XML document, but cannot be used to validateXML. The WITH clause can be used with OPENXML to specify a table name that defines the relational structure of the result.You should not import the XML documents into an xml data type and use the exist() method. The exist() method is an xml data type method used to determine if a specific XML node exists. The exist() method is not used to validate XML.You should not use FOR XML AUTO with the XMLSCHEMA option. The FOR XML clause is used with a SELECT statement to output relational data in XML format.The XMLSCHEMA option allows you to include an inline schema in the generated output.

Question:

What should you do?

Options:

Use OPENXML including a WITH clause.

Import the XML documents into an xml data type and use the exist() method.

Use FOR XML AUTO with the XMLSCHEMA option.

Register the XML schema using the CREATE XML SCHEMA COLLECTION statement.

Correct Answer

The Correct Answer for this Question is

Register the XML schema using the CREATE XML SCHEMA COLLECTION statement.

Explanation

The Question – What should you do? has been answered correctly and answers for the question is Register the XML schema using the CREATE XML SCHEMA COLLECTION statement.

More about these Exams

These Exam Questions and the order of these questions keep changing. but the answers are obviously same. so if you don’t find a question after another we suggest you search it in the search box and we are sure you’ll find it. you can bookmark this site for Quick access in future.

We hope you found it helpful don’t forget to leave a comment if you feel a need to correct or ask we’re always here to help.

you can find more here at mnccertified

Feel free to contact via comment or email.

Happy Learning

Cheers, Team MNCcertified

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *