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

  Explain a sql server deadlock

Explain a SQL Server deadlock. Which of the following statements is true concerning subqueries? A correlated subquery is where the outer query depends on data from the inner query.

  Write a memorandum to sam jones

Write a memorandum to Sam Jones (CIO) and present your research findings. Your memorandum should be no longer than 500 words.

  Identified in the system analysis report

An E-R diagram of your database that clearly shows the primary and foreign keys - Database has minimum number of records in each table as specified in assignment instructions.

  Create a schema that supports the company business

Create a schema that supports the company's business and processes. Explain and support the database schema with relevant arguments that support the rationale for the structure

  Program that simulates game of rock-paper

Write a program that simulates a game of rock, paper, scissors between a human and the computer in best 2 out of 3 rounds.

  Write a script that includes two sql statements code

Write a script that includes two SQL statements coded as a transaction to delete the row with a customer ID of 8 from the Customers table. To do this, you must first delete all addresses for that customer from the Addresses table.

  Conduct a search online for tutorials about normalization

Conduct a search online for tutorials about normalization. Choose three tutorials that you think best teach you about normalization.

  What purpose of sequence diagrams and communication diagrams

What size do you think a project needs to be in order to require project management? Discuss this question for project management in general and for each of the project-planning activities. Consider the various "size" factors of a project, such as..

  Design and develop an it help desk system

The system has to be Web-based system using Design interface of the system using visual basic.

  Functional dependency explain the difference between

explain the difference between functional dependencies that arise from equations and those that do

  Complete a modified data dictionary for specialized register

Complete a modified data dictionary for a specialized registry/database for a disease or condition described in one of the scenarios that i will give to you

  Why might an organization select mysql over sql server

Large-scale database are available on several platforms. Among those are MySQL, SQL Server, and Oracle. Other than cost, why might an organization select MySQL over SQL Server or Oracle

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