<?xml version="1.0" standalone="no"?>

<!DOCTYPE xmlsql SYSTEM "xmlsql.dtd">

<xmlsql>

<retract construct="table" name="ug"/>
<retract construct="table" name="tutor"/>

<update label="create tutor">
CREATE TABLE tutor
(  sno INTEGER NOT NULL,
   sname VARCHAR(20) NOT NULL,
   CONSTRAINT tutor_pk PRIMARY KEY (sno)
)
</update>

<update label="create ug">
CREATE TABLE ug 
(  id INTEGER NOT NULL,
   name VARCHAR(20) NOT NULL,
   left_on DATETIME NULL,
   degree VARCHAR(4) NOT NULL,
   sno INTEGER NOT NULL,
   CONSTRAINT ug_pk PRIMARY KEY (id),
   CONSTRAINT ug_tutor_fk FOREIGN KEY (sno) REFERENCES tutor
)
</update>

<update>
INSERT INTO tutor VALUES (1,'pjm')
</update>

<update>
INSERT INTO tutor VALUES (2,'jamm')
</update>

<update>
INSERT INTO ug VALUES (100,'wr','30-jun-98','g500',1)
</update>

<update>
INSERT INTO ug VALUES (101,'vc',null,'g500',1)
</update>

<query>
<sql>SELECT * FROM tutor</sql>
</query>

<query>
<sql>SELECT * FROM ug</sql>
</query>
</xmlsql>
