Given the following insert statement:
INSERT INTO product ( pid, description ) VALUES ( ‘100-100-01’, XMLPARSE ( DOCUMENT
‘<product xmlns=”http://posample.org” pid=”100-100-01” > <description> <name>Snow Shovel,
Basic 22in</name> <details>Basic Snow Shovel, 22in wide, straight handle with D-Grip</details>
<price>9.99</price> <weight>1 kg</weight> </description> </product>’ PRESERVE
WHITESPACE ) );
Which of the following table definitions will support the insert statement above?

A.
CREATE TABLE product
( pid XML NOT NULL PRIMARY KEY,
name VARCHAR(128),
price DECIMAL(30,2),
promoprice DECIMAL(30,2),
promostart DATE,
promoend DATE,
description XML);
B.
CREATE TABLE product
( pid VARCHAR(10) NOT NULL PRIMARY KEY,
name VARCHAR(128),
price DECIMAL(30,2),
promoprice DECIMAL(30,2),
promostart DATE,
promoend DATE,
description XML);
C.
CREATE TABLE product
( pid XML NOT NULL PRIMARY KEY,
name VARCHAR(128),
price DECIMAL(30,2),
promoprice DECIMAL(30,2),
promostart DATE,
promoend DATE,
description VARCHAR(1000));
D.
CREATE TABLE product
( pid VARCHAR(10) NOT NULL PRIMARY KEY,
name VARCHAR(128),
price DECIMAL(30,2),
promoprice DECIMAL(30,2),
promostart DATE,
promoend DATE,
description VARCHAR(1000));
pid XML is not for character strings of ‘100-100-01’
description XML is suited for the: XMLPARSE ( DOCUMENT
‘ Snow Shovel,
Basic 22in Basic Snow Shovel, 22in wide, straight handle with D-Grip
9.99 1 kg ’ PRESERVE
WHITESPACE )
So B is correct
0
0
An XML column has several restrictions. The column cannot:
Be specified as part of the primary key
Be specified as part of a UNIQUE key
0
0