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

<!DOCTYPE xmlsql SYSTEM "xmlsql.dtd">

<xmlsql>

<retract construct="table" name="person"/>
<retract construct="table" name="dept"/>

<update label="create dept">
CREATE TABLE dept 
(  dname VARCHAR(20) NOT NULL,
   CONSTRAINT dept_pk PRIMARY KEY (dname)
)
</update>

<update label="create person">
CREATE TABLE person
(  id INTEGER NOT NULL,
   name VARCHAR(20) NOT NULL,
   sex CHAR(1) NOT NULL,
   dname VARCHAR(20) NOT NULL,
   CONSTRAINT person_pk PRIMARY KEY (id),
   CONSTRAINT person_worksin_dept_fk FOREIGN KEY (dname) REFERENCES dept
)
</update>


<update>
INSERT INTO dept VALUES ('CS-BBK')
</update>

<update>
INSERT INTO dept VALUES ('Computing-IC')
</update>

<update>
INSERT INTO person VALUES (1,'Alex','F','CS-BBK')
</update>

<update>
INSERT INTO person VALUES (2,'Dimitri','M','CS-BBK')
</update>

<update>
INSERT INTO person VALUES (3,'Mike','M','Computing-IC')
</update>

<update>
INSERT INTO person VALUES (4,'Nerissa','F','Computing-IC')
</update>

<update>
INSERT INTO person VALUES (5,'Peter','M','Computing-IC')
</update>

</xmlsql>
