Question

Create an XML document for the Oracle Starter Database Tables (i.e., emp, dept, ord, product, price)....

Create an XML document for the Oracle Starter Database Tables (i.e., emp, dept, ord, product, price). Each XML document must be in the format as described in the "Mapping tables to XML" section on pg. 1161 (any column that does not have a value can be displayed as empty, e.g., <DEGREE></DEGREE> ). The name for each document will be the name of the table followed by ".xml" as the file extension (e.g., "emp.xml").

Data for PRODUCT Table:

CREATE TABLE PRODUCT (
 PRODID              NUMBER (6) CONSTRAINT PRODID_PK PRIMARY KEY,
 DESCRIP             VARCHAR2 (30));
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('100860', 'ACE TENNIS RACKET I');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('100861', 'ACE TENNIS RACKET II');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('100870', 'ACE TENNIS BALLS-3 PACK');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('100871', 'ACE TENNIS BALLS-6 PACK');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('100890', 'ACE TENNIS NET');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('101860', 'SP TENNIS RACKET');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('101863', 'SP JUNIOR RACKET');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('102130', 'RH: "GUIDE TO TENNIS"');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('200376', 'SB ENERGY BAR-6 PACK');
INSERT INTO PRODUCT (PRODID, DESCRIP)
 VALUES ('200380', 'SB VITA SNACK-6 PACK');
0 0
Add a comment Improve this question Transcribed image text
Answer #1

XML Document for Oracle Table

As per the given details and table description, the XML document craeted for Product table will be:

Product.xml

<?xml version="1.0"?>
<PRODUCTS>
<PRODUCT>
<PRODID>100860</PRODID>   
<DESCRIP>ACE TENNIS RACKET I</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>100861</PRODID>   
<DESCRIP>ACE TENNIS RACKET II</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>100870</PRODID>   
<DESCRIP>ACE TENNIS BALLS-3 PACK</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>100871</PRODID>   
<DESCRIP>ACE TENNIS BALLS-6 PACK</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>100890</PRODID>   
<DESCRIP>ACE TENNIS NET</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>101860</PRODID>   
<DESCRIP>SP TENNIS RACKET</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>101863</PRODID>   
<DESCRIP>SP JUNIOR RACKET</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>102130</PRODID>   
<DESCRIP>RH: "GUIDE TO TENNIS"</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>200376</PRODID>   
<DESCRIP>SB ENERGY BAR-6 PACK</DESCRIP>
</PRODUCT>
<PRODUCT>
<PRODID>200380</PRODID>   
<DESCRIP>SB VITA SNACK-6 PACK</DESCRIP>
</PRODUCT>
</PRODUCTS>

In the above Product.xml document the root element(parent) is '<PRODUCTS>' and under this element, all the Product records are written in separate <PRODUCT> blocks.

As you did not provide the other table details and exact file format of your section, I couldn't include the other documents of tables  (i.e., emp, dept, ord, price) here. You can follow the same format for all other tables according to their number of fields and populate the data to those elements of your need.

Kindly Note: - Please make sure you are included all the relevant details like complete table structure and data for the better and accurate solution.

Add a comment
Know the answer?
Add Answer to:
Create an XML document for the Oracle Starter Database Tables (i.e., emp, dept, ord, product, price)....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create an XML document for the Oracle Starter Database Tables (i.e., emp, dept, ord, product, price)....

    Create an XML document for the Oracle Starter Database Tables (i.e., emp, dept, ord, product, price). Each XML document must be in the format as described in the "Mapping tables to XML" section on pg. 1161 (any column that does not have a value can be displayed as empty, e.g., <DEGREE></DEGREE> ). The name for each document will be the name of the table followed by ".xml" as the file extension (e.g., "emp.xml"). Data for the Bonus table: CREATE TABLE...

  • Create an XML document for the Oracle Starter Database Tables (i.e., emp, dept, ord, product, price)....

    Create an XML document for the Oracle Starter Database Tables (i.e., emp, dept, ord, product, price). Each XML document must be in the format as described in the "Mapping tables to XML" section on pg. 1161 (any column that does not have a value can be displayed as empty, e.g., <DEGREE></DEGREE> ). The name for each document will be the name of the table followed by ".xml" as the file extension (e.g., "emp.xml"). Data for dept. table CREATE TABLE DEPT...

  • CREATE TABLE DEPT ( DEPTNO INTEGER NOT NULL, DNAME VARCHAR(14), LOC VARCHAR(13), PRIMARY KEY (DEPTNO)); INSERT...

    CREATE TABLE DEPT ( DEPTNO INTEGER NOT NULL, DNAME VARCHAR(14), LOC VARCHAR(13), PRIMARY KEY (DEPTNO)); INSERT INTO DEPT VALUES (10,'SPORTS','NEW YORK'); INSERT INTO DEPT VALUES (20,'HOME','DALLAS'); INSERT INTO DEPT VALUES (30,'OUTDOOR','CHICAGO'); INSERT INTO DEPT VALUES (40,'CLOTHING','BOSTON'); CREATE TABLE EMP ( EMPNO INTEGER NOT NULL, ENAME VARCHAR(10), JOB VARCHAR(9), MGR INTEGER, SAL FLOAT, COMM FLOAT, DEPTNO INTEGER NOT NULL, FOREIGN KEY (DEPTNO) REFERENCES DEPT (DEPTNO), FOREIGN KEY (MGR) REFERENCES EMP(EMPNO), PRIMARY KEY (EMPNO)); INSERT INTO EMP VALUES (7839,'KING','PRESIDENT',NULL, 5000,NULL,10); INSERT INTO...

  • Create SQL statements based on the given tables: Code to create the tables: CREATE DATABASE LAB...

    Create SQL statements based on the given tables: Code to create the tables: CREATE DATABASE LAB4DB; USE LAB4DB; CREATE TABLE CUSTOMER ( CUS_CODE int primary key, CUS_LNAME varchar(15), CUS_FNAME varchar(15), CUS_INITIAL varchar(1), CUS_AREACODE varchar(3), CUS_PHONE varchar(8), CUS_BALANCE float(8) ); INSERT INTO CUSTOMER VALUES('10010','Ramas','Alfred','A','615','844-2573','0'); INSERT INTO CUSTOMER VALUES('10011','Dunne','Leona','K','713','894-1238','0'); INSERT INTO CUSTOMER VALUES('10012','Smith','Kathy','W','615','894-2285','345.86'); INSERT INTO CUSTOMER VALUES('10013','Olowski','Paul','F','615','894-2180','536.75'); INSERT INTO CUSTOMER VALUES('10014','Orlando','Myron','','615','222-1672','0'); INSERT INTO CUSTOMER VALUES('10015','O''Brian','Amy','B','713','442-3381','0'); INSERT INTO CUSTOMER VALUES('10016','Brown','James','G','615','297-1228','221.19'); INSERT INTO CUSTOMER VALUES('10017','Williams','George','','615','290-2556','768.93'); INSERT INTO CUSTOMER VALUES('10018','Farriss','Anne','G','713','382-7185','216.55'); INSERT INTO CUSTOMER VALUES('10019','Smith','Olette','K','615','297-3809','0'); /*...

  • -- drop tables DROP TABLE REQUEST CASCADE CONSTRAINTS; DROP TABLE FULLORDER CASCADE CONSTRAINTS; DROP TABLE PRODUCT...

    -- drop tables DROP TABLE REQUEST CASCADE CONSTRAINTS; DROP TABLE FULLORDER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; -- create and link tables CREATE TABLE CUSTOMER (    CustomerID   INTEGER,    Name       VARCHAR2(40),    City       VARCHAR2(20),    State       CHAR(2),    Zip       CHAR(5),    CONSTRAINT PK_CUSTOMER        PRIMARY KEY (CustomerID) ); CREATE TABLE PRODUCT (    ProductID   INTEGER,    Description   VARCHAR2(30),    Material   VARCHAR2(20),    Price       NUMBER(5,2),    CONSTRAINT PK_PRODUCT...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT