Write a select statement that returns an xml document

Assignment Help Database Management System
Reference no: EM131066929

Exercise

1. Write a SELECT statement that returns an XML document that contains all of the invoices in the Invoices table that have more than one line item. This document should include one element for each of these columns: InvoiceNumber, InvoiceDate, InvoiceTotal, InvoiceLineltemDescription, and InvoiceLineltemAmount. Then, save the XML document that's returned in a file named MultipleLineltems.xml. Finally, generate an XML schema for the file and save it in a file named MultipleLineliems.xsd.

2. Write a script that uses the XML document shown below to update the contact information in the Vendors table.

<ContactUpdates>

<Contact VendorlD="4">

<LastName>McCrystle</LastName> <FirstName>Timothy</FirstName> </Contact>

<Contact VendorIa="10"›

<LastName>Flynn</LastName> <FirstName>Erin</FirstName> </Contact>

</ContactUpdates>

To accomplish this, begin by storing this XML document in a variable of the XML type. Then, you can use two UPDATE statements to update the Vendors table.

3. Write a script that returns a result set that contains all of the data stored in the XML document in exercise 2.

4. Write a script that (1) creates a table named Instructions, (2) inserts the XML document shown below into the table, and (3) selects all records from this table. The Instructions table should have two columns. The first column should be an identity column named InstructionslD, and the second column should be an xml column named Instructions.

<Instructions>

<Step>

<Description>This is the first step.</Description> <SubStep>This is the first substep.<SubStep>

<SubStep>This is the second substep.<SubStep>

</Step> <Step>

<Description>This is the second step.</Description>

</Step> <Step>

<Description>This is the third step.</Description>

</Step> </Instructions>

Exercise

1. Modify the first ProductDB class presented in this chapter so the ReadImage method accepts a PictureBox control as a second argument like this:

public static void Readlmage(int imageID, PictureBox pictureBox)

Then, modify the ReadImage method so it streams data from the database to the PictureBox control, and modify the code for the form so it works with this new method. To do this, you can begin by copying code from the form into the ProductDB class.

2. Modify the second ProductDB class so it works as described in exercise 1.

Attachment:- create_ap.rar

Reference no: EM131066929

Questions Cloud

The recommendation report : When writing a recommendation report, discuss when you know you have written enough. Discuss the writer's ethical obligations in general when writing recommendation reports.
Background knowledge for understanding : This book provides teachers with the background knowledge for understanding the role linguistics plays in literacy development.
Determine the order in which the gasolines should be produce : determine the order in which the gasolines should be produced each day.
What are the dimensions of the largest area he can enclose : what are the dimensions of the largest area he can enclose?
Write a select statement that returns an xml document : Write a SELECT statement that returns an XML document that contains all of the invoices in the Invoices table that have more than one line item.
Figure of speech : Sometimes in poems or stories, the writers attribute human traits to non-living things. What is this figure of speech called?
Name the shakespearean play : Name the Shakespearean play in which you get to meet twins, - a brother and a sister; and state their names.
Should the united states government require all citizens : Read the information presented in Section 12.1 (Chapter 12) and consider the following questions when writing your Bioethical Issues Essay: Should the United States government require all citizens, or only those who are arrested for any reason, to..
Supporting evidence using a behavior theory : Read the case study of Mark, located in Level A, Case 1 of The Iris Center's "Measuring Behavior." Using this case study, create a plan that addresses the following:

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd